473,387 Members | 1,678 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,387 software developers and data experts.

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.redirect command works fine, but the page
reloads with the first tab selected every time. If I try to change the
selectedindex, it runs my SelectedIndexChanged routine so that doesn't work
either.

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

Below is my code:

Sub TabStrip_PIP_SelectedIndexChange(sender As Object, e As EventArgs)
Select Case Tabstrip_PIP.selectedindex
Case 0
Response.Redirect("ProjectSummary.aspx")
Tabstrip_PIP.selectedindex = 0
Exit Sub
Case 1
Response.Redirect("ChargeNumbers.aspx")
Exit Sub
Case 2
Response.Redirect("Invoices.aspx")
Exit Sub
Case 3
Response.Redirect("Labor.aspx")
Exit Sub
Case 4
Response.Redirect("Travel.aspx")
Exit Sub
Case 5
Response.Redirect("ODC.aspx")
Exit Sub
Case 6
Response.Redirect("Subcontracts.aspx")
Exit Sub
Case 7
Response.Redirect("PurchaseOrders.aspx")
Exit Sub
Case 8
Response.Redirect("ChargeSummary.aspx")
Exit Sub
End Select
End Sub
<iewc:tabstrip id="TabStrip_PIP" runat="server" autopostback="true"
Height="26px"
TabDefaultStyle="background-image:url(images/DarkBlueGradient.jpg);font-family:verdana;font-weight:bold;font-size:8pt;color:#ffffff;width:79;height:21;text-align:center;"
TabHoverStyle="background-color:#777777;color:#ffd275;"
TabSelectedStyle="background-image:url(images/DarkBlueGradientflip.jpg);color:#FFFFFF;"
OnSelectedIndexChange="Tabstrip_PIP_SelectedIndexC hange">
<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="Subcontractors"></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 1267

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

Similar topics

3
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...
2
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...
2
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...
0
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...
1
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....
3
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 ...
4
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...
2
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...
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.