Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Parameters
Message
 
To
07/08/2003 22:58:40
Jacci Adams
Lindsay-Adams Consulting
Louisville, Ohio, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00818061
Message ID:
00818692
Views:
16
>Hi All,
>
>I'm designing a web form that has a user defined control (ascx) on it. This ascx needs values from parent container controls. How do I pass values to the child ascx? I need these values when the ascx's Save button is clicked. I don't know if session variables would be appropriate or not?
>
>Thanks,
>Jacci

An alternate way of doing this, assuming the value you are retrieving is coming from something the end user has typed in/selected, is to just access the HTML field directly (and bypass the fancy object model built up by ASP.NET). For example, if you've got a text field named "txtSample", and you need to get this value in your ASCX file, you can grab them directly using code like this in your ASCX's code-behind page:
try
{
   string Sample = Request.Form["txtSample"];
}
catch (Exception ex)
{
   // something weird
}
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform