Here you are adding the Literal control to the page.
Page.Controls.Add(new LiteralControl(xmldata));
You need to set this xml data in ViewState. Set this ViewState in one of your Controller like this.
public ActionResult Index()
{
ViewData["CurrentTime"] = DateTime.Now.ToString();
return View();
}
And Show in the View like this.
<div>
<%: ViewData["CurrentTime"] %>
</div>