Click here to Skip to main content
15,798,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i open a new window from a WebMethod in Asp.net.I want to use a webmethod for accessing code behind from JQuery.In the WebMethod because it is static method we cannot access the controls in the aspx page.and cannot use ScriptManager.RegisterStartupScript(this.UpdPanel,typeof(string), "OPEN_WINDOW", fullURL, true); etc.In the webMethod i want to open new pop up window with the conditions on method
Posted
Updated 18-Oct-11 3:01am
v2

1 solution

You can call the WebMethod then pass any data necessary back to the calling JavaScript and open the window from there.
 
Share this answer
 
Comments
DIVYA.K.PANI 18-Oct-11 8:23am    
I cannot call a javascript function from the WebMethod
[no name] 18-Oct-11 9:12am    
Of course you can't. You do call a WebMethod FROM JavaScript and that call does RETURN to JavaScript. Popup Windows are created and opened FROM JavaScript.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900