GridView add two Active/Deactive button button_click table update value

Posted by Webmasters964 under ASP.NET on 10/1/2013 | Points: 10 | Views : 1461 | Status : [Member] | Replies : 1
Hi

GridView add two Active/Deactive button button_click table update value

Ex: Active button =1

Deactive button=0

<asp:GridView ID="grdUserList" runat="server" AutoGenerateColumns="False" DataKeyNames="UserID" OnRowCommand="grdUserList_RowCommand"  >
<Columns>
<asp:BoundField DataField="UserID" HeaderText="UserID" InsertVisible="False" ReadOnly="True" SortExpression="UserID" />
<asp:TemplateField HeaderText="CurrentStatus">
<ItemTemplate>
<table>
<tr>
<td align="center" style="width: 78px">
<asp:Button ID="Button2" runat="server" Text="Active" /></td>
<td align="center" style="width: 76px">
<asp:Button ID="Button3" runat="server" Text="Deactive" /></td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>

</Columns>
</asp:GridView>


button_click table update value any one help code ..




Responses

Posted by: Bandi on: 10/1/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer is link for Button click event inside GridView
http://www.aspsnippets.com/articles/asp.net-gridview---get-row-index-on-rowcommand-and-click-events.aspx

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Webmasters964, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response