1

I am using the following ways to call :

Using Page Methods

1)

function callBackMiscQuoteItems(val) {
    PageMethods.FillTowingMiscItemsGrid();
}

[WebMethod]

public static void BindControls() {
}

2) <% BindControls(); %>

but this 2 procedures are not working

anybody there to help me out ..

can we use JQuery to call or any other way ?

1 Answer 1

0

asp.net call WebMethod from Javascript asyncronous - take a look at this post.

About your code. Your webmethod is called BindControls, if it is not just an example, but you are calling PageMethods.FillTowingMiscItemsGrid() instead of PageMethods.BindControls(). Another possible problem: PageMethods.FillTowingMiscItemsGrid() this call will do nothing on client side. You must specify success callback function to do something on client side:

PageMethods.FillTowingMiscItemsGrid(function(response) {//do something})

Also, code like <% BindControls(); %> is executed on server and will not generate JS call by default.

Here is a small tutorial about how to use webmethods.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.