Question

link btn not displaying as it should

<th style="width:200px;">
              <asp:LinkButton id="linkBtn" runat="server" Text='<%# Eval("Title") %>' OnCommand="LoadCheckListRecordEntry"/>
       </th>  

The data inside the 'Text' doesnt appear as a link btn should, its just in normal text, if the user clicks on it however it will perform what it is meant to...but for visual representation it does not show the different btn it and the next row??


EDIT:

<asp:Repeater id="rptChecklistRecords" runat="server">
    <HeaderTemplate>
        <table class="detailstable FadeOutOnEdit">
            <tr>   
              <th style="width:200px;">Title</th> 
              <th style="width:200px;">Timestamp</th>    
            </tr>
    </HeaderTemplate>
    <ItemTemplate>
             <tr>                  
               <th style="width:200px;">

                              <asp:LinkButton id="linkBtn" runat="server" Text='<%# Eval("Title") %>' OnCommand="LoadCheckListRecordEntry"/>

               </th>  
               <th style="width:200px;"><%# Eval("Timestamp") %></th>  
             </tr>
    </ItemTemplate>
    <FooterTemplate>
        </table>
    </FooterTemplate>
</asp:Repeater>
</asp:Content>
Was it helpful?

Solution

Try adding a CSS class to it and style that

 <asp:LinkButton CssClass="linkBtn" id="linkBtn" runat="server" Text='<%# Eval("Title") %>' OnCommand="LoadCheckListRecordEntry"/>

CSS

 a.linkBtn {
      text-decoration: underline; 
      color: blue
 }

OTHER TIPS

on the webpage "linkbutton" renders as anchor("<a/>") tag hence it will not show as link until you specify a href to it or style it with the css to look like a link

There is a CSS style that is changing the appearance of your link. Check with F12 tools or similar to see what style(s) are being applied to the tag.

<th style="width:200px;">
              <asp:LinkButton id="linkBtn" runat="server" Text='<%# Eval("Title") %>' 
OnCommand="LoadCheckListRecordEntry"/>
       </th>  

Use CCS for background image, use &nbsp as Link text and use Response.Redirect(YourPage) on Click event

Enjoy ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top