Anjali Khan

Anjali Khan

  • NA
  • 867
  • 224.5k

my column name is not binding from to db and clickable

Jan 2 2018 8:32 AM
Hi Frnds
 
i want to make my grid column name as clickable which shoulb be bind from the db.if i am using by href it is working but if i showing using link button it is not binded.i am mentioning both code 
 
1>
<asp:TemplateField HeaderText="User Name." SortExpression="usrname" HeaderStyle-CssClass="Text-Center">
<ItemTemplate>
<a href="javascript:void();" onclick="window.open('<%#DataBinder.Eval(Container.DataItem,"usrname")%>','main','scrollbars=no,fullscreen=no')">
<%# DataBinder.Eval(Container.DataItem, "usrname")%></a>
<asp:Label ID="lblusername" runat="server" Text='<%# Eval("usrname") %>' Visible="false"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
 
 
2>
<asp:TemplateField HeaderText="User Name." SortExpression="usrname" HeaderStyle-CssClass="Text-Center">
<ItemTemplate>
<asp:LinkButton ID="LinkButtonname" runat="server" CommandName="ShowPopup"
CommandArgument='<%#Eval("Name") %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
 

Answers (1)