0

I see lots of information about posting data from jQuery to an ASP.NET page using AJAX call, but nothing for the other way around.

How do I call a jQuery method from an ASP.NET page?

1

2 Answers 2

2

I think you want to call jquery from server side , here is an example for calling jquery from c#.

ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "script", "postfunction();", true); 
Sign up to request clarification or add additional context in comments.

Comments

0
 $.ajax({ type: "POST", url: 'ControllerName/FunctionName', data: '{mydate: "' + $("#mydata").val() + '" }', contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { alert(data); }) } }); 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.