hi all,
page name :test.ascx
$.ajax({
type: 'POST',
url: 'test.ascx/GetRandomSalt',
contentType: 'application/json; charset=utf-8',
data: {},
dataType: 'json',
async: false,
success: function (r) {
result= r.d;
document.getElementById('<%=hdnRandomKey.ClientID %>').value = result;
callback(result);
}, error: function (x, e) {
alertify.alert("Server not responding, Please try again later.")
}
});
here i have used this test.ascx user control in three various aspx pages in another folder
in ADMIN folder
----------------
first.aspx
second.aspx
third.aspx
these three aspx pages having test.ascx
in USERCONTROL folder
----------------------
test.ascx
both ADMIN folder and USERCONTROL folder are in same path
problem is if i placed the webmethod in first.aspx.vb its working fine(it means i have to write the same code in three pages know). Instead of that i placed the webmethod in test.ascx.vb file means its not working.
Requirement is I need to write the webmethod in test.ascx it easy to handle three pages
Thanks in advance,
Vels