Last active
January 29, 2016 12:58
-
-
Save bjoerntx/23b246d40840d79f6a60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult Index() | |
{ | |
// create a new instance of the model | |
// fill the model from your data source here | |
address newAddress = new address() | |
{ | |
Name = "Peter Jackson", | |
Street = "2332 Paul Jackson Dr" | |
}; | |
// create a new XML document | |
XmlDocument xml = SerializeToXmlDocument(newAddress); | |
// fill the ViewBag and return the view | |
ViewBag.xmlDataSource = xml; | |
return View(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment