2
Answers

How to send gridview column value to code behind

Sivakumar

Sivakumar

8y
393
1
Hi
 
This is my gridview template field:
 
<asp:TemplateField HeaderText="Preview">
<ItemTemplate>

<div id='<%# "msgs" + Container.DataItemIndex + 1 %>' style="display: none;">

<img src="data:image/png;base64,<%# getBase64((byte[])Eval("Logo"))%>" style="width: 250px; height: 200px" />
<br />
<%# Eval("Message") %>
</div>

<a onclick="showMessage('<%# "msgs" + Container.DataItemIndex + 1 %>')" class="note_icon_order text-center center-block">Preview

</a>


</ItemTemplate>
</asp:TemplateField> 
 
I want to use <%# Eval("Message") %>  value in my c# code behind of command argument event.
 
Please tell me the procedure
 
Thanks.
 
 
Answers (2)