I have a javascript file (viewer.js) situated in Scripts/viewer.js My default.aspx has a javascript functions that calls a c# function in the default.aspx.cs ( it sends a http webrequest)
Now I want to call from the viewer.js the function in default.aspx which calls the c# function.
How can I handle this in my viewer.js?
I need to do this because I work with 3D objects and the select event is on the viewer.js
When I select the 3D object it needs to call the function in default.aspx...
Scripts/viewer.js
function ClickPickItem(item) {
$("#properties").show();
/*Call function App() */
}
Default.aspx
function App() {
PageMethods.Connect(callback);
}
Default.aspx.cs
[WebMethod]
public static string Connect()
{
string rsp = DigestAuthFixer.GrabResponse("http://<username>:<password>@nextbus.mxdata.co.uk/nextbuses/1.0/1");
... CODE TO MAKE HTTPWEBREQUEST
}
Sorry if I'm not clear enough
I don't see another option like this
What I need to do?
Thanks!