Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

sharing control data between pages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Carlos - 17 Oct 2007 14:34 GMT
Hi all,

what is the best way to share the data of lets say a textbox text between
pages?
for example if I fill the textbox in one page and later redirect to a new
page, and
I would like to have that information there as well (VB). Thanks in advance.

        Carlos.
Eliyahu Goldin - 17 Oct 2007 14:44 GMT
Session variable will do in all cases.

Signature

Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net

> Hi all,
>
[quoted text clipped - 6 lines]
>
>         Carlos.
Carlos - 19 Oct 2007 19:48 GMT
Thanks Eli

> Session variable will do in all cases.
>
[quoted text clipped - 8 lines]
>>
>>         Carlos.
TarTar - 17 Oct 2007 18:11 GMT
Hello Carlos,

My personal favourite for passing information between pages is
HttpServerUtility.Transfer().
http://msdn2.microsoft.com/en-us/library/y4k58xk7(VS.80).aspx
"Transfer method preserves the QueryString and Form collections." It means
you can access previous page's view state.

If you use ASP.NET 2.0, google for "Cross-Page Postings" and the PostBackUrl
property.

Cheers,
Leszek "TarTar"

> Hi all,
>
[quoted text clipped - 6 lines]
>
>         Carlos.
Steve C. Orr [MCSD, MVP, CSM, ASP Insider] - 17 Oct 2007 22:38 GMT
You could use Server.Transfer instead of Response.Redirect.
Then you could use Context to access the PreviousPage (and it's controls)
directly.
Here's more info:
http://SteveOrr.net/articles/PassData.aspx
http://SteveOrr.net/faq/TransferRedirect.aspx

Signature

I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

> Hi all,
>
[quoted text clipped - 6 lines]
>
>         Carlos.
Carlos - 19 Oct 2007 19:48 GMT
That's great Steve. Thank you very much.

  Carlos.

> You could use Server.Transfer instead of Response.Redirect.
> Then you could use Context to access the PreviousPage (and it's controls)
[quoted text clipped - 13 lines]
>>
>>         Carlos.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.