Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Cameron Evans   on Mar 30 In Asp.net Category.

  
Question Answered By: Aaleyah Khan   on Mar 30

I think you just have to do a load of "if then"'s


<tr>
<td valign="middle" class="text">
<% if (staff){ %>
<asp:Button id="Button1" class="edititem" runat="server" Text='<%# ((string)DataBinder.Eval(Container.DataItem, "itemid")).Trim()%>' onmouseover="this.className='edititemover'" onmouseout="this.className='edititem'" commandname="Edit" />
<% } else { %>
<%# DataBinder.Eval(Container.DataItem, "itemid")%>
<% } %>
</td>
</tr>

is what I did once upon a time.

Also a neat trick is

<%# MySupp((string)DataBinder.Eval(Container.DataItem, "suppname"))%>

where MySupp is a function and so you can generate a load of <tr><td>'s from code behind based on the bound value "suppname".

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Link buttons on DG Or get search suggestion and latest updates.


Tagged: