Hi am working on a windows application in which i have to call a aspx page which read values from database and convert it into an XML.I have no clue how to call a aspx page and make it return a value to the calling windows application.I tried using Web request method it doesnot return anything.Please suggest me a idea how to do this
Share
You can use WebClient, something like this :
this is a sitemap XML generated by HttpModule that intercepts requests for XML files:
And this is a theoretical aspx that returns XML
There is no difference in the call, except of course in address
On Server side (asp.net app), it would be better to use ASHX handler since is more suited for returning XML, In your ASP.NET application add new item, and choose generic handler :
and here is the code for GetXml.ashx handler that will return sample XML from App_Data folder :