//JavaScript
function CheckedChange(objCheckBox) {
if (confirm('Are you sure , You want to change status?')) {
__doPostBack("'" + objCheckBox.id + "'", '');
return true;
}
else {
return false;
}
}
//Html
<asp:GridView ID="gv_Knowledge" runat="server">
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="Chk_ActiveKnow" runat="server" Checked='<%# Eval("Active") %>' oncheckedchanged="Chk_ActiveKnow_CheckedChanged"
AutoPostBack="true"
onclick="javascript:return CheckedChange(this);"/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:GridView/>
function CheckedChange(objCheckBox) {
if (confirm('Are you sure , You want to change status?')) {
__doPostBack("'" + objCheckBox.id + "'", '');
return true;
}
else {
return false;
}
}
//Html
<asp:GridView ID="gv_Knowledge" runat="server">
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="Chk_ActiveKnow" runat="server" Checked='<%# Eval("Active") %>' oncheckedchanged="Chk_ActiveKnow_CheckedChanged"
AutoPostBack="true"
onclick="javascript:return CheckedChange(this);"/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:GridView/>
No comments:
Post a Comment