21 Mayıs 2010 Cuma

MVC

object o=new{name="Rob", type="quack"}

//This evaluates to "name=\"Rob\" type=\"quack\" "
string myList=o.ToAttributeList()


 




<form action="<%=Url.Action(new{controller="Home", action="Index"})%> method=post>



 




<%=Html.RenderUserControl("~/UserControls/ForumList.ascx")%>
<%=Html.RenderUserControl("~/UserControls/ForumList.ascx", new{GroupID=2})%>



 




<%using(Html.Form("Home","Index"))%>
...
<%}%>

<%using(Html.Form("Home","Index"), FormExtensions.FormMethod.get)%>
...
<%}%>

<%=Html.Submit("Save")%>
<%=Html.SubmitImage("~/Images/SaveButton.gif")%>

Object.UpdateFrom(Request.Form)
Controller.ReadFromRequest(
string key)

Product p
=new Product();
p.UpdateFrom(Request.Form);

Hiç yorum yok:

Yorum Gönder