Saturday, March 24, 2012

TabStrip code in VB.NET

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

/Kennethtake a look at the tabstrip control at www.asp.net, comes with the
sourcecode

--
Regards

John Timney (Microsoft ASP.NET MVP)
--------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
--------------

"Kenneth" <anonymous@.discussions.microsoft.com> wrote in message
news:4A56DAA1-7BF9-4396-94DD-D28F86D644F8@.microsoft.com...
> 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
John,

This is exactly what I mean. in www.asp.net they're referring to the ie web ctrls and tabstrip can't handle urlnavigation to existing .aspx documents.

The IEWebCtrls are NOT the correct answer.

/Kenneth
well you can set IE controls... TabStrip exactly to do a postback... in the
postback you can check for the SelectedIndex and post it to whatever aspx
name you need to.
its not the most elegant way but it sure does the job.

private void tsNav_SelectedIndexChange(object sender, System.EventArgs e)
{
SetNav();
}
private void SetNav()
{
switch(tsNav.SelectedIndex)
{
case 0:
myLoader.Attributes.Add("src", "CA_ShowEarlyBird.aspx");
break;
case 1:
myLoader.Attributes.Add("src", "CA_ShowCategories.aspx");
break;
case 2:
myLoader.Attributes.Add("src", "CA_ShowSubCategories.aspx");
break;
case 3:
myLoader.Attributes.Add("src", "CA_ShowAvailableColors.aspx");
break;
case 4:
myLoader.Attributes.Add("src", "CA_ShowAvailableSizes.aspx");
break;
case 5:
myLoader.Attributes.Add("src", "CA_ShowProducts.aspx");
break;
case 6:
Response.Redirect("~/Signout.aspx");
break;
}
}

and it sure does work...

--
Regards,
HD
Once a Geek... Always a Geek
"Kenneth" <anonymous@.discussions.microsoft.com> wrote in message
news:3A86E31B-3662-4D24-8F95-14A7676DA18D@.microsoft.com...
> John,
> This is exactly what I mean. in www.asp.net they're referring to the ie
> web ctrls and tabstrip can't handle urlnavigation to existing .aspx
> documents.
> The IEWebCtrls are NOT the correct answer.
> /Kenneth

0 comments:

Post a Comment