.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 22nd, 2003, 12:38 PM
kscdavefl kscdavefl is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Orlando
Posts: 2 kscdavefl User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Pass a Value

I need to pass a value from one TextBox on a WebForm to another TextBox on another WebForm. I am rather new to C# and I am having difficulty performing this task. Any help is greatly appreciated.

Thanks,

Dave

Reply With Quote
  #2  
Old October 27th, 2003, 12:49 AM
sano sano is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Location: Redmond, WA
Posts: 218 sano User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
It's not as hard as you think. All you have to do is traverse from the first webform to the second webform and in the page_load event handler on the second form, access the index pertaining to the name of the text field that you desire to retrieve data from.

Suppose on the first page, you have a field named 'address' and you want that information to show up in a similar field on the second page, you'd type the following:
Code:
nameOfTextFieldOnSecondPage.Text = HttpApplication.Request.Form[ "address" ].ToString();

Keep in mind that you will need to post the information to the second page in order to use the Request.Form indexer.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Pass a Value


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT