문제

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>
도움이 되었습니까?

해결책

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
 }

다른 팁

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 ;)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top