请教:
我DRM 里插入一个 一行一列的表格
然后保存为 WebForm1.aspx ! 我打开 vs ,然后再往那个表格里拖入一个 Button1 控件(web Form)得到代码如下:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<table width="90" border="0" id="TABLE1" runat="server">
<tr>
<td width="84" height="38">
<asp:Button id="Button3" runat="server" Text="Button"></asp:Button></td>
</tr>
</table>
</body>
</html>可是我运行时出现这样的错误:
Server Error in '/MyWeb/WebApplication20' Application.
--------------------------------------------------------------------------------Control 'Button3' of type 'Button' must be placed inside a form tag with runat=server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Control 'Button3' of type 'Button' must be placed inside a form tag with runat=server.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[HttpException (0x80004005): Control 'Button3' of type 'Button' must be placed inside a form tag with runat=server.]
System.Web.UI.Page.VerifyRenderingInServerForm(Control control)
System.Web.UI.WebControls.Button.AddAttributesToRender(HtmlTextWriter writer)
System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer)
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlTableRow.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlTable.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Page.ProcessRequestMain()
各位大哥,我应该怎么修改呢?谢谢!
我DRM 里插入一个 一行一列的表格
然后保存为 WebForm1.aspx ! 我打开 vs ,然后再往那个表格里拖入一个 Button1 控件(web Form)得到代码如下:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<table width="90" border="0" id="TABLE1" runat="server">
<tr>
<td width="84" height="38">
<asp:Button id="Button3" runat="server" Text="Button"></asp:Button></td>
</tr>
</table>
</body>
</html>可是我运行时出现这样的错误:
Server Error in '/MyWeb/WebApplication20' Application.
--------------------------------------------------------------------------------Control 'Button3' of type 'Button' must be placed inside a form tag with runat=server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Control 'Button3' of type 'Button' must be placed inside a form tag with runat=server.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[HttpException (0x80004005): Control 'Button3' of type 'Button' must be placed inside a form tag with runat=server.]
System.Web.UI.Page.VerifyRenderingInServerForm(Control control)
System.Web.UI.WebControls.Button.AddAttributesToRender(HtmlTextWriter writer)
System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer)
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlTableRow.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlTable.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Page.ProcessRequestMain()
各位大哥,我应该怎么修改呢?谢谢!
解决方案 »
- 急:怎么取出数据表某一记录的字段返回到Textbox中......(c# asp.net2.0 Oracle)
- gridview编辑状态下,获取被编辑行控件问题。
- 求个判断字符串的代码,越简越好,运用在前台的。
- DataGrid绑定
- 重装系统后现在web.config文件提示出错,信息如下:
- 用asp.net做图库分页问题
- js replace() 正则表达式替换并替换成不同的值?
- 100分在线等待,请大家帮忙,怎样在程序中移动Treeview选择到任意一个node?
- Panel加载多个控件
- 调用Sqlhelper请教如何释放DB资源?
- 关于DataGrid分页的一个问题,请大侠帮帮忙……
- 迷茫的我,不知如何选择……
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form runat="server">
<table width="90" border="0" id="TABLE1" runat="server">
<tr>
<td width="84" height="38">
<asp:Button id="Button3" runat="server" Text="Button"></asp:Button></td>
</tr>
</table>
</form>
</body>
</html>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form runat="server" id="form1">
<table width="90" border="0" id="TABLE1" runat="server">
<tr>
<td width="84" height="38">
<asp:Button id="Button3" runat="server" Text="Button"></asp:Button></td>
</tr>
</table>
</form>
</body>
</html>
这样的话,有些比如也面连接类等才不会出现混乱。。
因为 我是用抓图软件把别人的网站抓下来,然后放到 Photoshop 里去处理,然后保存为
Web 页面,然后再用 DRM 打开,然后再保存为 webform1.aspx请教,如果先用 DRM 打开 webform1.aspx ,我怎么把 用photoshop 处理的网页倒入进来呢?
谢谢!
各位大哥,是不是啊?
谢谢!