473,395 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Tweaking AJAX Tab Panel Preservation

I have several pages that have 3 tabs.
One of the desired effects is to preserve whatever tab the user may have
selected from page-to-page.
So I use the following Client-Side script to remember a Tab that the user
selects. I can then preserve it and use the number to switch to the same tab
on another page:

<script type="text/javascript">
function PanelClick(sender, e) {
}

function ActiveTabChanged(sender, e) {
// use the client side active tab changed
// event to trigger a callback thereby
// triggering the server side event.
__doPostBack('<%= tabs.ClientID %>',
sender.get_activeTab().get_headerText());
}

</script>

I combine that client-side script with this code-behind:

Protected Sub Tabs_ActiveTabChanged(ByVal sender As Object, ByVal e As
System.EventArgs)
Session("ssTab") = Me.Tabs.ActiveTabIndex
End Sub
and then in the Load_Event of the page in question:

'return whatever tab the user has selected
Me.Tabs.ActiveTabIndex = Session("ssTab")
The problem with this, particularly if the page is data intensive, is that
there is a significant delay before the client-side script kicks off and does
the 'post-back'
so, for example, the user sees the page presented when they click the tab,
but a couple of seconds later - it does the postback (just so that the server
side can record whatever tab the user selected)

How can I tweak this to get the best desired outcome -
which is:
1) preserve the tab index when the user clicks it
2) use that index on other pages - but WITHOUT a tacky postback mid-viewing

Jul 9 '08 #1
1 1585
Hi,

Use Ajax to call a page method of the page... from script...
tab must not do any post back...
and in the web method save the index in session.

http://www.singingeels.com/Articles/...PNET_AJAX.aspx

Best of luck

-----------
Munna

www.munna.shatkotha.com/blog
www.munna.shatkotha.com
www.shatkotha.com
Jul 12 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Blue Streak | last post by:
I am trying to wade into the waters of client-side scripting to be integrated with ASPdotNET. Are there any ready-made tools for use wth dotNET? I am assuming that is what ajaxnet and...
2
by: rodchar | last post by:
hey all, i saw an update panel example one time where they put a button outside the update panel and a textbox inside the panel and setup a trigger on the update panel to update when the button...
2
by: DanWeaver | last post by:
I have a page where layout of buttons and listboxes etc is important - I would like to make use of Ajax Update panel to asynchronously update various part of the page- in Vis studio whenever I use...
5
by: Kursat | last post by:
Hi, I want to add new collapsable panel items using java script at client side. Is this possible to create Ajax components like collapsable panel without server round trip? Thanks in advance.
2
by: =?Utf-8?B?VG9u?= | last post by:
Hello, I want to understand teh benefits of ajax technology. Does anyone has a good website where AJAX EXTENSIONS is worked out so I really understand it. There a 2 main questions: 1) How about...
0
by: nityaprashant | last post by:
hello.. i used ajax update panel in my cart form now i want to use paypal button for redirect online transaction because of ajax update panel round trip is not possible.. so paypal button gives...
5
by: simon | last post by:
hello, I have a server set up on my local (home) network and can not get an ajax application to run on the box. it works fine on our developement server and also works fine locally. I...
1
by: db007 | last post by:
Hi, I have a problem with a current project and the scroll position. I have an AJAX enabled website using Visual Studio 2005 and ASP.Net 2.0. The project also uses masterpages. On the...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.