Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6851677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:16:38+00:00 2026-05-27T01:16:38+00:00

I have a few controls designed to verify certain data before a user may

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:16:39+00:00Added an answer on May 27, 2026 at 1:16 am

    The attribute OnCheckedChanged requires a server-side event handler, not a javascript function.

    Try the onchange attribute which is the standard html attribute for the client-side event:

    <asp:CheckBox ID="chkDelete" runat="server" Text="Delete" onchange="show_confirm()" />
    

    Edit:

    It seems asp.net is generating a element and applies the ‘onchange’ on the span and not the .

    Found this post that deals with this problem: Add client-side onchange handler to ASP.NET CheckBox control

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use ValidationRules to verify that a few ListBox controls have at
I have few layers of nesting custom user controls: RegisterUser.aspx <%@ .... Inherit=System.Web.Mvc.ViewPage<RegisterUserViewModel> ...
I have a few custom controls that were created as Server Controls projects. I
I have a few controls that inherit from ASP.NET buttons and use onserverclick .
I have a few listview controls on a windows form and i've assigned a
I have a few asp:textbox controls in a form on a webpage, below is
I have a form that has a few similar controls and the parent contains
I have a page (telerik:RadPage) containing few grids and some nested controls and I
I have a user control that has a few public properties, one is an
So I have a WPF custom control library with a few controls. Some of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.