I have a custom control tabstrib and it loads another custom control when
clicked a tab.
Tabstrib event fires well but the other custom control which is dynamicly
loaded after clicking a tab, does not fire its event!
This is a common issue i beleive. I use the code in OnPreRender to find get
the event but it is ugly!
if(Page.IsPostB ack && Page.Request.Fo rm["__EVENTTAR GET"] != null)
{
string[] _et = Page.Request.Fo rm["__EVENTTAR GET"].ToString().Spl it('_');
if(_et.Length == 2)
{
if(_et.GetValue (0).ToString() == "lnkb" || _et.GetValue(0) .ToString() ==
"imgb")
{
_sSectionId = _et.GetValue(1) .ToString();
LoadControls((i nt)ViewState["TabIndex"]);
}
else
{
TTabStrip2.Sele ctTab(-1,
(ViewState["TabIndex"]!=null)?(int)Vi ewState["TabIndex"]:0);
TTabStrip3.Sele ctTab(-1,
(ViewState["TabIndex2"]!=null)?(int)Vi ewState["TabIndex2"]:0);
LoadControls((V iewState["TabIndex"]!=null)?(int)Vi ewState["TabIndex"]:0);
LoadControls((V iewState["TabIndex2"]!=null)?(int)Vi ewState["TabIndex2"]:4);
}
}
}
I want my tabstribs event handles which controls will be created dynamicly.
Thanks at advance
Emrah
clicked a tab.
Tabstrib event fires well but the other custom control which is dynamicly
loaded after clicking a tab, does not fire its event!
This is a common issue i beleive. I use the code in OnPreRender to find get
the event but it is ugly!
if(Page.IsPostB ack && Page.Request.Fo rm["__EVENTTAR GET"] != null)
{
string[] _et = Page.Request.Fo rm["__EVENTTAR GET"].ToString().Spl it('_');
if(_et.Length == 2)
{
if(_et.GetValue (0).ToString() == "lnkb" || _et.GetValue(0) .ToString() ==
"imgb")
{
_sSectionId = _et.GetValue(1) .ToString();
LoadControls((i nt)ViewState["TabIndex"]);
}
else
{
TTabStrip2.Sele ctTab(-1,
(ViewState["TabIndex"]!=null)?(int)Vi ewState["TabIndex"]:0);
TTabStrip3.Sele ctTab(-1,
(ViewState["TabIndex2"]!=null)?(int)Vi ewState["TabIndex2"]:0);
LoadControls((V iewState["TabIndex"]!=null)?(int)Vi ewState["TabIndex"]:0);
LoadControls((V iewState["TabIndex2"]!=null)?(int)Vi ewState["TabIndex2"]:4);
}
}
}
I want my tabstribs event handles which controls will be created dynamicly.
Thanks at advance
Emrah