Google+ Followers

Connect

Get Updates Via Email

Enter your email address:

Delivered by FeedBurner

Sunday, 10 February 2013

"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,

1. Default.aspx: Design Page


2) Default.aspx.cs: Code Behind


3) Output Snapshot Pictures


















2 comments :

  1. $("#tabs").tabs("option", "active", currTab);

    ReplyDelete
  2. I have read your blog its very attractive and impressive. I like it your blog.

    Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training

    Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes

    ReplyDelete

Share this to your friends