I’m creating a web application using C#.net
My webpage contains a Hidden Field Control. I need to use this control’s value in another page. I declared a method and inside this method i passed the entire page as a parameter. In another classfile i defined this method. Inside the method i tried to access the Controls that was in the page created. I tried but i can’t get the control.
Code:
HiddenField hdnTotal = page.FindControl("hdnTotal") as HiddenField;
Is anyother option to find this control in other class file.
Thanks In Advance!
Instead of passing a page as parameter did you try using
PreviousPageproperty to find a control? On the page where you want the control from previous page you could find hidden file like this: