asp.net - Response.Redirect, keep tabcontainer on active tab -
my vb.net tabcontainer needs stay on active tab when have each submit going through response.redirect.
how can achieve this? need response.redirect there because show has been added in main tab container.
<asp:tabcontainer runat="server" activetabindex="0" height="200px" width="175px" scrollbars="auto" enabletheming="true" font- underline="false" id="tabcontainer2" enableviewstate="false" style="float:right; padding-left: 110px; margin-bottom: 340px;" onactivetabchanged="tabcontainer1_activetabchanged"> protected sub tabcontainer1_activetabchanged(byval sender object, byval e eventargs) viewstate("activetabidx") = tabcontainer1.activetabindex end sub protected sub submitcompanies_click(byval sender object, byval e system.eventargs) handles submitcompanies.click *****there more code here question, it's not necessary has been omitted***** response.redirect(request.rawurl) viewstate("activetabidx") = tabcontainer1.activetabindex protected sub page_load(byval sender object, byval e system.eventargs) handles me.load productid.value = request.querystring("id") page.response.cache.setcacheability(httpcacheability.nocache) if not viewstate("activetabidx") nothing tabcontainer1.activetabindex = convert.toint32(session("activetabidx")) end if end sub
viewstate won't work response.redirect
. current implementation, use querystring or session store reference active tab.
response.redirect(string.format("{0}?tab={1}", request.rawurl, tabcontainer1.activetabindex))
Comments
Post a Comment