CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2001
    Location
    UK
    Posts
    308

    make 'Tabs' in the webpage

    Hi

    {Basically, i'm trying to achieve 'Tab' like appearance in my webpage, if you have any better way of coding this, apart from below my explanation, please suggest}


    how to access the 'table' control created within the 'DataList' control as i need to update theh table property. Code is attached below...(i'm using VS2005, C# in the project)

    I need to change the background of 'cHeader' in the below code, while i'm doing the databind operation 'ItemDataBound' event of the datalist control...but how to access this control from the page-behind code?

    1 cHeader.CssClass = "class_name"; -- this does not work... it erros, saying 'cHeader' is unknown...

    2 e.Item.FindControl("cHeader") inside the event returned "Null" ...


    Cheers
    Venu

    PHP Code:

    <asp:datalist id="DataList1" RepeatDirection="Horizontal" runat="server">
     <
    HeaderTemplate>
     </
    HeaderTemplate>
     <
    ItemTemplate>
      <
    asp:Table ID="tHeader" Runat="server">
       <
    asp:TableRow Runat="server" ID="rHeader">
        <
    asp:TableCell Runat="server" ID="cHeader">
         <
    asp:HyperLink ID="lnkTabs" Runat="server" text='<%#DataBinder.Eval(Container.DataItem, "Name")%>' NavigateUrl='<%#DataBinder.Eval(Container.DataItem, "Url")%>'>
         </
    asp:HyperLink>
        </
    asp:TableCell>
       </
    asp:TableRow>
      </
    asp:Table>
     </
    ItemTemplate>
    </
    asp:datalist
    Last edited by bharadwajrv; May 26th, 2007 at 03:51 PM. Reason: no one replied.. so added more clarity
    Venu Bharadwaj
    "Dream it. U can do it!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured