ASP.NET表单 - 表单名称\\ ID更改aspnetForm [英] ASP.NET Form - The form name\id changes to aspnetForm

查看:324
本文介绍了ASP.NET表单 - 表单名称\\ ID更改aspnetForm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的code:

<form Name="AddPlace" ID="AddPlace" action="AddPlace.aspx" class="niceform" method="post" runat="server">

当我尝试执行code我得到这个代替:

That when i try to execute the code i get this instead:

<form name="aspnetForm" method="post" action="AddPlace.aspx" id="aspnetForm" class="niceform">

为什么它的变化?

How come it changes?

推荐答案

ASP.NET Web表单接管表单元素控制;举例来说,如果你试图改变的动作,ASP.NET会忽视它改回来...为什么你需要一个特定的ID?为什么不能aspnetForm工作?

ASP.NET web forms takes control over the form element; for instance, if you try to change the action, ASP.NET will ignore it and change it back... why do you need a specific ID? Why won't aspnetForm work?

心连心。

这篇关于ASP.NET表单 - 表单名称\\ ID更改aspnetForm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆