|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Jun 2001
Location: London
Posts: 395
|
I would like to store some querystring variables in hidden form elements on the masterpage and reference them from web user controls so that I can preserve the information and consolidate the code in one place...
However, I cannot seem to get access to the information from the web user controls.... ![]() I am using public variables on the masterpage to set and get the hidden form element data, e.g: Public Property SelectedId() As Integer Get If hdSelectedId.Value = String.Empty Then hdSelectedId.Value = "0" End If Return hdSelectedId.Value End Get Set(ByVal Value As Integer) hdSelectedId.Value = Value End Set End Property But I cannot retrieve this information from the web user control using the following: me.master.SelectedId Even this will not work: Response.Write(Obj.FindControl("hdSelectedId").ToString) Any ideas how I can do this? |
|
|
|
|
|
#2 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: Cape Town, South Africa
Posts: 1,587
|
On your control or page you will have to try and access it. ((HiddenField)Page.Master.FindControl("hdnControlID")).Value.
I am not 100% sure on code now as its not infront of me and have not done it in a while Hope this helps |
|
|
|
|
|
#3 |
|
SitePoint Addict
![]() ![]() ![]() Join Date: Jun 2001
Location: London
Posts: 395
|
Thanks nightstalker for your reply - I have decided to just grab querystring each time...
|
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 00:39.










Linear Mode
