use UL/LI for tabs instead of INPUT (asp:Button)

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
crockettdunn
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 105
Joined: Sun Oct 26, 2008 6:32 pm
Contact:

use UL/LI for tabs instead of INPUT (asp:Button)

Post by crockettdunn » Wed Mar 20, 2013 10:53 am

I have a tabbed interface for displaying certain product template fields. http://dev.markimicrowave.com/Microwave ... -0010.aspx

I think it was originally built to postback, but then it was modified to "return false" and handle the clicks with client-side javascript.

My objective is to use LIs instead of INPUTs. I have changed this:

Code: Select all

		<asp:Button ID="btnPackages" Text="Packages" runat="server" />
		<asp:Button ID="btnTechDocs" Text="Tech Docs" runat="server"/>
		<asp:Button ID="btnSpecifications" Text="Specifications" runat="server"/>
		<asp:Button ID="btnBlockDiagram" Text="Block Diagram" runat="server"/>
		<asp:Button ID="btnSalesSupport" Text="Sales Support" runat="server"/>
to this:

Code: Select all

		<asp:ListItem ID="btnPackages" Text="Packages" runat="server" />
		<asp:ListItem ID="btnTechDocs" Text="Tech Docs" runat="server"/>
		<asp:ListItem ID="btnSpecifications" Text="Specifications" runat="server"/>
		<asp:ListItem ID="btnBlockDiagram" Text="Block Diagram" runat="server"/>
		<asp:ListItem ID="btnSalesSupport" Text="Sales Support" runat="server"/>

The errors I receive are in the form of:
'System.Web.UI.WebControls.ListItem' does not contain a definition for 'ClientID' and no extension method 'ClientID' accepting a first argument of type 'System.Web.UI.WebControls.ListItem' could be found (are you missing a using directive or an assembly reference?)
I also receive as similar error but for OnClientClick.

I should also add- when I comment-out all the error-causing stuff, no LIs are appearing in the HTML source.

What am I missing as a .Net rookie?

thanks.

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: use UL/LI for tabs instead of INPUT (asp:Button)

Post by ForumsAdmin » Thu Mar 21, 2013 2:57 am

asp:listItem is not the equivalant of ul/li. Listitem can exist inside a list control. Which list control are you using?

User avatar
crockettdunn
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 105
Joined: Sun Oct 26, 2008 6:32 pm
Contact:

Re: use UL/LI for tabs instead of INPUT (asp:Button)

Post by crockettdunn » Fri Mar 22, 2013 11:28 pm

I don't know which listcontrol to use (like I said, .Net novice I am). What is available in AC?

User avatar
crockettdunn
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 105
Joined: Sun Oct 26, 2008 6:32 pm
Contact:

Re: use UL/LI for tabs instead of INPUT (asp:Button)

Post by crockettdunn » Sat Mar 23, 2013 12:15 am

nevermind- I figured out enough to pull the code client-side, turn the asp:button's into LABELS, and encapsulate them within LIs.
Sexy tabs!
http://dev.markimicrowave.com/Amplifier ... ShowTab=46

Post Reply