"How to maintain or retain tabs in same tab after button click events or postback?" using JQuery in ASP.NET C#
In this post I'll share an details about " How to maintain or retain tabs in same tab after button click events or postback? "
Step 1: you need to download Jquery and JQueryUI Javascript libraries from this site http://jqueryui.com/
Step 2: As usually you can create ASP.NET website from Visual Studio IDE and add Jquery and JqueryUI plugins in the header section of aspx page.
Step 3: Add HiddenField control inside aspx page which is very useful to retain tab in same page
Step 4: Use the HiddenField ID in Jquery code to indicate that CurrentTab Index
Step 5: In code Behind, using Enumerations concept give the tab index values as user defined variable
Step 6: Use the Enum values in every Button click events on different tabs to check that tab could be retained in the same tab
Further, Here I'll give the code details and snap shot pictures,
Step 1: you need to download Jquery and JQueryUI Javascript libraries from this site http://jqueryui.com/
Step 2: As usually you can create ASP.NET website from Visual Studio IDE and add Jquery and JqueryUI plugins in the header section of aspx page.
Step 3: Add HiddenField control inside aspx page which is very useful to retain tab in same page
Step 4: Use the HiddenField ID in Jquery code to indicate that CurrentTab Index
Step 5: In code Behind, using Enumerations concept give the tab index values as user defined variable
Step 6: Use the Enum values in every Button click events on different tabs to check that tab could be retained in the same tab
Further, Here I'll give the code details and snap shot pictures,
$("#tabs").tabs("option", "active", currTab);
ReplyDelete