Advertisement
Guest User

Untitled

a guest
Oct 13th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. public ActionResult IndentXml(IndentXmlArgs args = null)
  2. {
  3.     if (args == null)
  4.         return View(new IndentXmlArgs());
  5.  
  6.     if (string.IsNullOrEmpty(args.Xml))
  7.         return View(args);
  8.  
  9.     var indentedXml = IndentXml(args.Xml);
  10.     args.Xml = indentedXml;
  11.  
  12.     return View(args);
  13. }
  14.  
  15. /* // here's the view, in case that matters
  16. @model fdumont.Models.IndentXmlArgs
  17.  
  18. @using (Html.BeginForm("IndentXml", "Utilities", FormMethod.Post, new {@class = "form-horizontal"}))
  19. {
  20.     @Html.TextAreaFor(model => model.Xml, 20, 80, new {style = "font-family: monospace", @class = "span12"})
  21.     <input type="submit" value="submit" class="btn" />
  22. }
  23. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement