Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Participant
852 Points
195 Posts
Dec 11, 2007 05:19 PM|LINK
Html.Form returns a Form object (in our case we have two kinds - Simple and Mvc<>) and not a string, so using the "<%=" (which is sugar for Response.Write) outputs the tags AND the type.
In this case you want to do one of two things:
<%using(Html.Form(...)){%>
<%}%>
or
<form action="<%=Url.Action("action","controller")%>">
robconery
Participant
852 Points
195 Posts
Re: Html.Form extension writing out debug message?
Dec 11, 2007 05:19 PM|LINK
Html.Form returns a Form object (in our case we have two kinds - Simple and Mvc<>) and not a string, so using the "<%=" (which is sugar for Response.Write) outputs the tags AND the type.
In this case you want to do one of two things:
<%using(Html.Form(...)){%>
<%}%>
or
<form action="<%=Url.Action("action","controller")%>">