![]() Public override void ExecuteResult(ControllerContext context)Ĭ = "text/xml" Ĭ = Encoding.UTF8 Helper class public class XmlResult : ActionResult Create elements in XmlModel object using values in rData ![]() Public ActionResult CreateData(Relation rData) Reads the data passed in and creates the XmlModel object that is serialized using helper class XmlResult. It contains the text boxes and a submit button which calls the CreateData action in the controller. The View.cshtml is strongly typed to the Relation class in FormModel. Models - FormModel.cs public class Relation Once entered the info and clicks Submit, an xml got generated which looked like: I had a form earlier which took input about the Relation title and FirstName, LastName of 2 persons.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |