如何将表单标签代码转换为具有母版页的页面?
我的 asp.net 网页具有以下内容:
<form id="WebCaptureForm" name="WebCaptureForm" onsubmit="return checkform(this);" enctype="multipart/form-data" method=post
action="http://site/page.aspx?idn=1&tr=100d1165&action=savenew">
我想使用包含相同代码的母版页创建新页面,但如何在具有母版页的网页中制作上述代码
I have asp.net web page that have the following :
<form id="WebCaptureForm" name="WebCaptureForm" onsubmit="return checkform(this);" enctype="multipart/form-data" method=post
action="http://site/page.aspx?idn=1&tr=100d1165&action=savenew">
I want to make new page with master page that contain the same code but how can i make the above code in a web page that have a master page
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于此
如果您希望该代码是单个页面,则可以创建另一个
ContentPlaceHolder
,并将位置放在主页面中,位于主Since this
<form>
isn't a server-side form (runat="server"
), you shouldn't have any trouble using it in a master page. Note that:<form>
cannot be nested in another<form>
.<form>
.<form>
, you can't really control itsname
,id
,method
andaction
. Action is the hardest one here, as in general, you want each page to post-back to itself.If you want to have that code is a single page, you can create another
ContentPlaceHolder
, and place is in the maste page, outside of your main<form>
tag.