model view controller - mvc - post xml to another site (and redirect to it) -
model view controller - mvc - post xml to another site (and redirect to it) -
i using mvc 2 , .net 3.5.
i have 2 mvc sites.
how can post xml message action/page in site 1 page in site 2? , @ same time redirect user site 1 page in site 2.
thank much
probably easiest way modify site 2 , add together controller action take application/x-www-form-urlencoded request (a.k.a. simple form post):
<form action="http://site2.com/" method="post"> <%= html.hiddenfor(x => x.xmldata) %> <input type="submit" value="go site 2" /> </form> and on site 2 within newly created action serve entry point fetch xml string , process it:
[httppost] [validateinput(false)] // <-- that's necessary posting xml public actionresult index(string xmldata) { // posted xml, , redirect or straight render view } model-view-controller http asp.net-mvc-2
Comments
Post a Comment