Last post Oct 02, 2013 02:53 AM by Steven Cheng - MSFT
Sep 27, 2013 11:17 AM|abfrank|LINK
Hello am new to web service. i want know if i can load a page by calling a web service method. ie if i can have something like Response.Redirect() or server.Transfer() in web service method so that when the we service is called, it load another web page.
Sep 27, 2013 12:29 PM|AZMatt|LINK
I don't think you can initiate this from a web service. You can return a URL from the webservice and have the page that is calling it do the redirect.
Sep 30, 2013 07:51 AM|Illeris|LINK
See this link for a sample : http://forums.asp.net/t/1118760.aspx
However : it is not directly a sample of good disign/architecture. Services return output messages. The content can be used to redirect to a new location.
Oct 02, 2013 02:53 AM|Steven Cheng - MSFT|LINK
WCF and ASP.NET ASMX webservice are used for distributed communication (cross machine or network boundary). They are not capable of presenting or displaying UI elements, so you cannot load or present web pages via webservice or WCF.
use hte retrieved HTML fragment to present dynamic UI (add them into existing elements on the page DOM) in your web page.