Post serialized to xml object to mvc action
Posted
by Maxim
on Stack Overflow
See other posts from Stack Overflow
or by Maxim
Published on 2010-05-19T10:54:40Z
Indexed on
2010/05/19
11:00 UTC
Read the original article
Hit count: 221
Hello! i have 2 projects. First project send to 2-nd via http-post requests, as serialized to XML class instances.
Ex:
<?xml version="1.0" encoding="utf-16"?>
<MyObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<UserId>test user</UserId>
...
How can i recieve it in action of 2-nd project?
[HttpPost]
public ActionResult Index(MyObject id)
{ ...
or like string, and deserialize after?
Thanx.
© Stack Overflow or respective owner