Skip to content

Instantly share code, notes, and snippets.

@tunatoksoz
Created November 7, 2009 12:59
Show Gist options
  • Save tunatoksoz/228672 to your computer and use it in GitHub Desktop.
Save tunatoksoz/228672 to your computer and use it in GitHub Desktop.
//DOES NOT SHOW THE USERNAME+HELLO IN THE username BOX
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(string username)
{
ViewData["username"] = username + "helloo";
return View();
}
//DOES SHOW THE EMAIL+HELLO IN THE username BOX
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(string email)
{
ViewData["username"] = email + "helloo";
return View();
}
HERE IS THE VIEW
<%using(Html.BeginForm())
{%>
<%=Html.TextArea("email") %>
<%=Html.TextArea("username",ViewData["username"] as string) %>
<input type="submit" />
<%} %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment