all groups > asp.net building controls > april 2006 >
You're in the

asp.net building controls

group:

Accessing hidden controls on ascx page


Accessing hidden controls on ascx page krallabandi NO[at]SPAM gmail.com
4/26/2006 12:36:27 PM
asp.net building controls:
I have a hidden control
<input id="FieldSortOrder" type="hidden" name="FieldSortOrder"
runat="server"> in a ascx page. I want to store some value in this
control in the code behind page.

FieldSortOrder.Value = "xyz"

I am getting compilation errors - 'FieldSortOrder' is not declared.

The same thing is working good on aspx. how can it be done on ascx?


Thanks.
Re: Accessing hidden controls on ascx page Steve C. Orr [MVP, MCSD]
4/26/2006 3:37:34 PM
Are you trying to access the control from within the ASCX code behind, or
from within the Page's code behind?
If you're trying to access it from the Page's code behind, this should help:
http://SteveOrr.net/faq/PassDataToUserControl.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net



[quoted text, click to view]

AddThis Social Bookmark Button