Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / April 2006

Tip: Looking for answers? Try searching our database.

Accessing hidden controls on ascx page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
krallabandi@gmail.com - 26 Apr 2006 20:36 GMT
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.
Steve C. Orr [MVP, MCSD] - 26 Apr 2006 23:37 GMT
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

Signature

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

>I have a hidden control
> <input id="FieldSortOrder" type="hidden" name="FieldSortOrder"
[quoted text clipped - 8 lines]
>
> Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.