Edited by SomeNewKid. Please post code between <code> and </code> tags.
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