473,665 Members | 2,820 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tabstrip SelectedIndex reverting to 0 on page load

Greetings,

I am using a tabstrip in a user control (ascx) in a web application (aspx)
that is used to navigate between the different aspx pages. Whenever I click
on one of them, the response.redire ct command works fine, but the page
reloads with the first tab selected every time. If I try to change the
selectedindex, it runs my SelectedIndexCh anged routine so that doesn't work
either.

Is there a way I can change the selectedindex of the tabstrip without
running the "OnSelectedInde xChange" command?

Below is my code:

Sub TabStrip_PIP_Se lectedIndexChan ge(sender As Object, e As EventArgs)
Select Case Tabstrip_PIP.se lectedindex
Case 0
Response.Redire ct("ProjectSumm ary.aspx")
Tabstrip_PIP.se lectedindex = 0
Exit Sub
Case 1
Response.Redire ct("ChargeNumbe rs.aspx")
Exit Sub
Case 2
Response.Redire ct("Invoices.as px")
Exit Sub
Case 3
Response.Redire ct("Labor.aspx" )
Exit Sub
Case 4
Response.Redire ct("Travel.aspx ")
Exit Sub
Case 5
Response.Redire ct("ODC.aspx")
Exit Sub
Case 6
Response.Redire ct("Subcontract s.aspx")
Exit Sub
Case 7
Response.Redire ct("PurchaseOrd ers.aspx")
Exit Sub
Case 8
Response.Redire ct("ChargeSumma ry.aspx")
Exit Sub
End Select
End Sub
<iewc:tabstri p id="TabStrip_PI P" runat="server" autopostback="t rue"
Height="26px"
TabDefaultStyle ="background-image:url(image s/DarkBlueGradien t.jpg);font-family:verdana; font-weight:bold;fon t-size:8pt;color: #ffffff;width:7 9;height:21;tex t-align:center;"
TabHoverStyle=" background-color:#777777;c olor:#ffd275;"
TabSelectedStyl e="background-image:url(image s/DarkBlueGradien tflip.jpg);colo r:#FFFFFF;"
OnSelectedIndex Change="Tabstri p_PIP_SelectedI ndexChange">
<iewc:Tab Text="Program Summary"></iewc:Tab>
<iewc:Tab Text="Charge Numbers"></iewc:Tab>
<iewc:Tab Text="Invoices" ></iewc:Tab>
<iewc:Tab Text="Labor"></iewc:Tab>
<iewc:Tab Text="Travel"></iewc:Tab>
<iewc:Tab Text="ODCs"></iewc:Tab>
<iewc:Tab Text="Subcontra ctors"></iewc:Tab>
<iewc:Tab Text="Purchase Orders"></iewc:Tab>
<iewc:Tab Text="Charge Summary"></iewc:Tab>
</iewc:tabstrip>

Thanks for your help,

-Dave
Nov 19 '05 #1
0 1271

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

Similar topics

3
2038
by: vikaskuk | last post by:
hi all, i am using tabstrip with multipage control in asp.net. i have put some textboxes on the first tab. my requirement is that whenever user makes some changes in any of textbox and moves to next tab without saving this data he should get alert message and should be stopped on current tab itself.
2
3419
by: tottigang | last post by:
Hi, I have a tabstrip and I have some tabs in it. On the first page, all the tabs are enabled, I need to disbale part of the tabs at a specific point in the application and again enable them. I have a hard time doing this. This is concerned with a production issue. Could anyone please suggest me a solution to this. I appreciate your time and help.
2
2273
by: Robert V. Hanson | last post by:
I have a user control built using the Microsoft IE Control. I declared a public variable as int32 (DefaultTab) in the user control. I can't seem to provide the correct syntax to the tabstrip property other than SelectedIndex = 1 which works but if I try SelectedIndex = DefaultTab, it fails stating that DefaultTab is not a valid value for Int32. Thanks in advance for any help!!
0
1528
by: Do | last post by:
Hi, I'm using the Microsoft IE Web Control for tabstrip. After a user enters some data and submits it, I want to activate another tab (and in making that tab active, I will also show another page (from multipage). How do I get at the tabstrip or multipage properties to set them? Do I set the selectedindex if I want it active?
1
1227
by: Flynn Arrowstarr | last post by:
I am using a TabStrip control in a .ascx file so I can create a menu navigation system for my ASP.NET application. The menu never changes, so I have every page in the app using the .ascx control. I have the TabStrip set up, and it calls the pages correctly. However, I can't figure out how to change the SelectedIndex when the page loads. For instance, the application loads with Tab0 as the default. When I click on Tab1,...
3
1730
by: Kenneth | last post by:
Hi, I've tried to find a way to connect .aspx pages to a TabStrip webctrl but I've only found code with embedded <table><tr> stuff. Can anyone help me finding some useful code? TIA /Kenneth
4
4628
by: Asim Qazi | last post by:
Hi All i m using tab strip control plz help me setting its navigation my cod is private void TabStrip1_SelectedIndexChange(object sender, System.EventArgs e) { switch (TabStrip1.SelectedIndex)
2
1422
by: Bart Schelkens | last post by:
Hi, I've created a webusercontrol that contains a tabstrip (Microsoft.Web.UI.WebControls.TabStrip. I want to raise the event when the selected index of the tabstrip changes. I wrote the following code : Public Event TabIndexChanged(ByVal intSelectedIndex As Int16) Private Sub TabStrip1_onSelectedIndexChange(ByVal sender As System.Object,
0
1158
by: ae | last post by:
can someone help me? i copied this from msdn, and can't get it to work on the Response.Redirect. I think it should be that, and I also tried Page.Navigate("www.yahoo.com"), but that gave me an error so I thought I'd try it this way. <%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %> <HTML> <script runat="server">
0
8348
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8863
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8779
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8549
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8636
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7376
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4356
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.