I have a page that contains a user control.
Can i make an ajax request directly to the control?
I know I can make an ajax request to .aspx or .ashx; however, is it possible to go direct to the .ascx?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
In an ASP.NET MVC application yes:
and then send the AJAX request:
will load the Foo.ascx partial view inside a div.
In a classic ASP.NET WebForms application you will need to setup a generic handler that renders the contents of the user control into the response. Here’s an example of a generic handler that could be used: