is viewstate written on FORM available on User Control?
-
Hello All Can u pls help regarding viewstate.......... I'm using user contol for some code. Also using viewstate on form1.aspx(e.g.). User control is placed on this form. I need to access form viewstate value on usercotrol. is it possible? is viewstate written on FORM available on User Control? :)Pls help me in this regard.
Balasaheb Software Developer
-
Hello All Can u pls help regarding viewstate.......... I'm using user contol for some code. Also using viewstate on form1.aspx(e.g.). User control is placed on this form. I need to access form viewstate value on usercotrol. is it possible? is viewstate written on FORM available on User Control? :)Pls help me in this regard.
Balasaheb Software Developer
What is the Form viewstate value that you're looking to get? Do you mean a control value on that form that is stored in viewstate between postbacks?
-
Hello All Can u pls help regarding viewstate.......... I'm using user contol for some code. Also using viewstate on form1.aspx(e.g.). User control is placed on this form. I need to access form viewstate value on usercotrol. is it possible? is viewstate written on FORM available on User Control? :)Pls help me in this regard.
Balasaheb Software Developer
Hi! You need to create a public property(set & get) in your user control.When you do this you can set the value of this property to anything your like (Viewstate in your case).
string name;
public string Name
{
set
{
name = value;
}
get
{
return name;
}
}Access it in form like UserControl1.Name =Viewstate["object"]; Regards