|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Passing values between user controls in separate formsHi! I have what I hope is a simple problem. I have 2 web forms. The first
form is a welcome page with a textbox and button (in a user control). What's supposed to happen is that a user will enter data in the textbox and click the button. The event handler for the button then has to send that value to a the second web form containing a user control that can accept that value as a parameter in a db query and display the user control with the results of the query. I can set the value of the query in the user control and display the page on its own, but how do I get the textbox value from another form? I'll happily supply code if my description isn't clear. Thanks, campwes The page's lifecycle starts and ends in every browser request. To persist
data between pages use the Session, QueryString or Cookies. http://msdn2.microsoft.com/en-us/library/87069683.aspx http://msdn2.microsoft.com/en-us/library(d=robot)/system.web.httprequest.querystring.aspx http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchaspnetcookies101.asp Show quoteHide quote "campwes" wrote: > Hi! I have what I hope is a simple problem. I have 2 web forms. The first > form is a welcome page with a textbox and button (in a user control). What's > supposed to happen is that a user will enter data in the textbox and click > the button. The event handler for the button then has to send that value to > a the second web form containing a user control that can accept that value as > a parameter in a db query and display the user control with the results of > the query. I can set the value of the query in the user control and display > the page on its own, but how do I get the textbox value from another form? > I'll happily supply code if my description isn't clear. > > Thanks, > > campwes
formview with objectDataSource won't display data
Web UserControl DropDownlist control event not working... generating textboxes on the fly ASP.Net (2003) bug with gridview.selectedvalue? How to refresh a dropdownlist inside a DetailsView? Create a word like doc from C#.NET Menu control MenuItemClick does not fire. Hidden input field named "__EVENTVALIDATION" multiView vs panel GridView W/Drop Down List Question |
|||||||||||||||||||||||