Try this
First add an
Generic Handler For eg Test.ashx
public class Test : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
if (context.Request.QueryString["input"] != null)
{
context.Response.Write("Test");
}
}
}
Then in your master page
$.ajax({
type: 'post',
url: 'Test.ashx?input=1',
cache: false,
error: function (xhr, status, errorthrown) {
alert(errorthrown + '\n' + status + '\n' + xhr.statustext);
},
success: function (html) {
alert(html);
},
datatype: 'html'
});