Im working in ASP.net with C#, i need help to correct or have an approach to get what i need. Im working with gridview, data select a set of data that will be used depending of its primarykey into another table.
On the runtime on client side, i need to collect on the onclick event, the sid column of each row and put it into a hidden field. However, the code below, is not working for me as the <%#eval("sid"); %>! is being read as a string, than the current row value.
What i need is the checkbox once clicked alert(5) instead of alert('<%#eval("sid"); %>!'); that is what is currently doing.
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox runat="server" ID="cbSelect" onclick="javascript:alert('<%#eval("sid"); %>!');"/>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataTextField="nombre" NavigateUrl="http://www.google.com" HeaderText="direccion"/>
<asp:BoundField DataField="sid" HeaderText="sid" InsertVisible="False"
ReadOnly="True" SortExpression="sid" />
<asp:BoundField DataField="nombre_archivo" HeaderText="nombre_archivo"
SortExpression="nombre_archivo" />
</Columns>
If further information is needed, please ask what you need me to add to the question.