Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ASP.NET
<asp:LinkButton ID="btnSelect" CommandName="Select" tag='<%#Eval("Name") %>' Text="Select" runat="server" OnClientClick="CloseWithArg(this);return false;" />


I want to send id through this button how can i send .
Posted
Updated 2-Sep-12 20:58pm
v2

1 solution

Hi ,
Check this
XML
<asp:GridView ID="GridView1" runat="server">
          <Columns>
              <asp:TemplateField>
                  <ItemTemplate>
                     <asp:LinkButton ID="btnSelect1" CommandName="Select" CommandArgument='<%#Eval("Name") %>'
          Text='<%#Eval("Name") %>'  runat="server" OnClientClick="CloseWithArg(this);return false;"
          onclick="btnSelect_Click" />
                  </ItemTemplate>
              </asp:TemplateField>
          </Columns>
      </asp:GridView>


By the way it will not work out side the context of databound
Best Regards
M.Mitwalli
 
Share this answer
 
Comments
Manas Bhardwaj 3-Sep-12 6:22am    
+5
Mohamed Mitwalli 3-Sep-12 6:29am    
Thanks Manas
Mohamed Mitwalli 3-Sep-12 6:29am    
Thanks Manas :)
[no name] 3-Sep-12 6:54am    
my 5
Mohamed Mitwalli 3-Sep-12 7:15am    
Thanks Mits

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900