I have a few controls designed to verify certain data before a user may do a soft delete on server data.
The error:
Compiler Error Message: CS1061: 'ASP.editdivision_aspx' does not contain a definition for 'show_confirm' and no extension method 'show_confirm' accepting a first argument of type 'ASP.editdivision_aspx' could be found (are you missing a using directive or an assembly reference?)
Line 28: <td><asp:TextBox runat="server" ID="txtDivisionName" Width="250" /></td>
Line 29: </tr>
Line 30: <tr><td><asp:CheckBox ID="chkDelete" runat="server" Text="Delete" OnCheckedChanged="show_confirm" /></td></tr>
Line 31: <tr><td><asp:Button ID="btnSave" runat="server" Text="Save" OnClick="SaveClick" /></td></tr>
Line 32: </table>
The script:
<script type="text/jscript" >
function show_confirm() {
PageMethods.VerifyDelete(CallSuccess, CallFailed);
}
function CallSuccess(res, destCtrl) {}
function CallFailed(res, destCtrl) {
var r = confirm("There are active Campaigns in this Division!\nAre you sure you want to proceed?");
if (r == true) {
PageMethods.Save();
//alert("Division and related Campaigns deleted.");
}
}
</script>
I have been unable to determine why I am getting this runtime error. I am new to asp and javascript so I am sure it is something simple I missed, but I have been searching for 2 days on what the problem is.