首页 新闻 会员 周边

关于BeginForm的问题

0
悬赏园豆:10 [待解决问题]

直接BeginForm使用可以正常,

<%using (Html.BeginForm()){ %>

<%}%>

直接访问地址http://localhost:51615/home/index

<form action="/home/index" method="post"></form>

然后访问http://localhost:51615/home/index/1

<form action="/home/index/1" method="post"></form>

 

 

我就是想加一个ID,然后from的action会跟着router变

如果把form加上一个为id(reg_from)就是不行了

<%using (Html.BeginForm("index", "home",null, FormMethod.Post, new { id = "reg_from" }))
{
%>
<%}%>

如果访问http://localhost:51615/home/index/1   还这样的

<form action="/home/index" id="reg_form" method="post" ></form>

小权的主页 小权 | 初学一级 | 园豆:10
提问于:2011-03-03 11:05
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册