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 6186849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:57:33+00:00 2026-05-24T01:57:33+00:00

The following is my implementation of a PageMethod call to a server-side method. It

  • 0

The following is my implementation of a PageMethod call to a server-side method. It is currently generating this error message “Uncaught ReferenceError: PageMethod is not defined”. I can see this error in the Chrome Javascript console. My research suggests that the most common problems with PageMethods are forgetting to set EnablePageMethods to “true” (did that) and needing to rebuild the application (did that too). I’m stumped now. Can anyone spot what I’ve done wrong?

Script Manager:

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="true">

ASPX:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
    function confirmCallBackFn(arg) {
        if (arg == true) {
            var firstDataItem = $find("<%=RadGrid1.ClientID %>").get_masterTableView().get_dataItems()[0];
            var PackageID = firstDataItem.getDataKeyValue("PackageID");
            PageMethod.RemovePackagePageMethod(PackageID);
                }
        else {
        }
    }
</script>

</telerik:RadCodeBlock> 

Code Behind:

[WebMethod()]
public static void RemovePackagePageMethod(int PackageID)
{
    Inventory inv = new Inventory();
    inv.RemovePackage(PackageID);

}
public void RemovePackage(int PackageID)
{
    SBMData2.SBMDataContext db = new SBMData2.SBMDataContext();

    var boxes = from p in db.Packages
                where p.PackageID == PackageID
                select p;

    foreach (var box in boxes)
    {
        db.Packages.DeleteOnSubmit(box);
    }

    try
    {
        db.SubmitChanges();
        RadGrid1.Rebind();
    }
    catch (Exception ex)
    {
        RadWindowManager1.RadAlert("System error deleting package", 200, 200, "exception", null);

    }


}

d

  • 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-24T01:57:34+00:00Added an answer on May 24, 2026 at 1:57 am

    try

    PageMethods.RemovePackagePageMethod(PackageID);
    

    (with an s – PageMethods instead of PageMethod)

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

Sidebar

Related Questions

In the following implementation of the mediator pattern why this.name in the initialize method
I have this following codes: @implementation MyImageView @synthesize image; //image is a UIImage -
this question is just speculative. I have the following implementation in C++: using namespace
I am trying to update my UITableView and the following implementation is not working.
I want to define inline function within alert class currently i have following implementation.
In the following implementation of a hypothetical navigation module the module object returns properties
I recently saw the following implementation of enqueue for a BlockingQueue ( source )
I have a problem with the following implementation of hook_cron in Drupal 6.1.3. The
Given I have two File objects I can think of the following implementation: public
The following XML implementation seems to work fine: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent

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.