M
Mark Tait
Hi - I have a problem in that my main page, which has a user control,
mtnav.ascx, only picks up on the change made in my user control, a step
behind me actucally making it. I need ti pick up on the changes on the
main page, as changes to the usercontrol should affect which panels I
show/hide on my main page.
My user control (mtnav.ascx) is a table of linkbuttons, which follow
this format:
...onclick="lblSearch_click"... - each of the buttons calls a sub in the
user control:
sub lblSearch_click(sender as object, e as eventargs)
setTab="search"
end sub
setTab is defined as:
public Property setTab as String
Get
return lslsetTab.text
End Get
Set
lblsetTab.text=value
Select case value
case "list"
tdlist.cssclass="mttabon"
tdsearch.cssclass="mttaboff"
case "search"
tdlist.cssclass="mttaboff"
tdsearch.cssclass="mttabon"
end select
End Set
End Property
In my main page, I have:
Sub Page_Load(sender as object, e as eventargs)
If IsPostBack then
response.write(usercontrol1.settab)
End If
end sub
If I click the Search tab, the Search tab of my user control will
change, but not until I select another tab, will the response.write show
Search - it's always a step behind, as if my main Page_Load happens
before the property is set.
Is there anyway of calling Page_Load again, or am I missing something
which would catch the change in the tab the first time around?
Mark Tait
(e-mail address removed)
www.fixitks.co.uk
mtnav.ascx, only picks up on the change made in my user control, a step
behind me actucally making it. I need ti pick up on the changes on the
main page, as changes to the usercontrol should affect which panels I
show/hide on my main page.
My user control (mtnav.ascx) is a table of linkbuttons, which follow
this format:
...onclick="lblSearch_click"... - each of the buttons calls a sub in the
user control:
sub lblSearch_click(sender as object, e as eventargs)
setTab="search"
end sub
setTab is defined as:
public Property setTab as String
Get
return lslsetTab.text
End Get
Set
lblsetTab.text=value
Select case value
case "list"
tdlist.cssclass="mttabon"
tdsearch.cssclass="mttaboff"
case "search"
tdlist.cssclass="mttaboff"
tdsearch.cssclass="mttabon"
end select
End Set
End Property
In my main page, I have:
Sub Page_Load(sender as object, e as eventargs)
If IsPostBack then
response.write(usercontrol1.settab)
End If
end sub
If I click the Search tab, the Search tab of my user control will
change, but not until I select another tab, will the response.write show
Search - it's always a step behind, as if my main Page_Load happens
before the property is set.
Is there anyway of calling Page_Load again, or am I missing something
which would catch the change in the tab the first time around?
Mark Tait
(e-mail address removed)
www.fixitks.co.uk