>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)
{
}