Hi there I have a situation where I need to make to call to a normal .aspx page from asp.net mvc web application. How can I make this request and get data back from the page. the data will be returned on on the page_load event of the .aspx page
A:
Well... you can redirect to the aspx page from an action result. For Example
public ActionResult GoOldSchool() {
Redirect("watever.aspx");
return View();
}
Where did you want to send the data? To a model? You can post back to the controller using routing for wherever the aspx is located if that is what you need.
James Santiago
2010-06-03 10:31:24
Thanks for your reply I need to return a Json string from the webpage. It is going to be an external webpage on production but for testing purposes need to mimic the aspx page
nuubee
2010-06-03 10:53:04
A:
I think to keep the 2 "technologies" separate, you should use query parameters to pass data back and forth.
Send the id to load the data from the aspx page and perform some actions on the data. Post to your asp.net mvc action with that same id and load the data.
PieterG
2010-06-03 10:36:03
ok thanks would i need to do a web request, this is to be done application_start of global asax
nuubee
2010-06-03 11:08:17