如何摆脱"默认"从的.aspx页面表单元素? [英] How to get rid of the "default" form-element from a .aspx-page?

查看:78
本文介绍了如何摆脱"默认"从的.aspx页面表单元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为该网络的标准网虫的我,我不喜欢默认的<形式=服务器> 围绕着我的整个网页。我见过没有这些许多基于ASP.NET网页,所以看起来它可以在不带走任何功能被删除。怎么样?

As that web-standards geek I am, I dislike the default <form runat="server"> that surrounds my entire webpages. I've seen many ASP.NET based webpages that don't have these, so it seems like it can be removed without taking away any functionality. How?

推荐答案

有将是一个&LT;形式=服务器&GT; 如果你想使用的控制'东经东西。否则,回发是不可能的,因为是视图状态和.NET这取决于剩下的东西。

There will have to be a <form runat="server"> if you wish to use controls 'n stuff. Otherwise postbacks are impossible, as is viewstate and the rest of the stuff that .NET depends upon.

你确定你见过你以为你见过?也许这些网页仅含静态内容?或许他们是用户控件?或者另一种常见的可能性 - 也许这是母版页是有&LT;形式=服务器&GT;

Are you sure you've seen what you've thought you've seen? Perhaps these pages only contained static content? Or perhaps they were user-controls? Or yet another common possibility - perhaps it was the Master Page that had the <form runat="server">?

这篇关于如何摆脱&QUOT;默认&QUOT;从的.aspx页面表单元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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