c# - Know which tab is selected from codebehind -


i have situation:

<div id="tabs">     <ul>         <li><a href="#tab-1"><span>one</span></a></li>         <li><a href="#tab-2"><span>two</span></a></li>         <li><a href="#tab-3"><span>three</span></a></li>     </ul> </div> 

and have button

<asp:button id="button" runat="server" onclick="button_click" /> 

my js

<script>     $(function () {         $(".tabs").tabs();         $('.rewrapper').css('width', 'auto');         $('.rewrapper').css('min-width', 'inherit');     }); </script> 

in codebehind want know tab in , depending on tab save formulary of tab.

how know codebehind tab selected? need check first tab selected save 1 information or another, have no idea hot selected tab? thanks

i dont know if idea, doing convert html controls server, , out onserverclick each li, , ask in same method li onserverclick 1 clicked , assign tabid hiddenfield. question now, how know wich link clicked (i have same method li). thanks!

you need add client side code store variable in asp.net hidden field, indicating tab selected. , in code behind, can access using hiddenfield.value property


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -