Tabstrip SelectedIndex reverting to 0 on page load

D

Dave

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top