我做好的网页,把他放到框加页面里就出现所有LinkButton按钮失效!点击按钮浏览器左下角说网页上有错误!双击查看错误:'theForm._EVENTTARGET'为空或不是对像,出错代码断是自动生成的脚本
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}下面是我框架页面的html代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManageMain.aspx.cs" Inherits="admin_ManageMain" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>main</title>
</head> <frameset rows="*" bordercolor="#47478d">
<frameset cols="180,*" framespacing="1" frameborder="yes" border="1" bordercolor="#47478d">
<frame src="left.aspx" name="left" scrolling="no" noresize>
<frame src="right.aspx" name="main">
</frameset>
</frameset></html>
请高手指点要怎么改这错,我aspx里面到处都用的是linkbutton不可能叫我全换成button吧!偶先谢过!
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}下面是我框架页面的html代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManageMain.aspx.cs" Inherits="admin_ManageMain" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>main</title>
</head> <frameset rows="*" bordercolor="#47478d">
<frameset cols="180,*" framespacing="1" frameborder="yes" border="1" bordercolor="#47478d">
<frame src="left.aspx" name="left" scrolling="no" noresize>
<frame src="right.aspx" name="main">
</frameset>
</frameset></html>
请高手指点要怎么改这错,我aspx里面到处都用的是linkbutton不可能叫我全换成button吧!偶先谢过!
<base target=_self>
2 每个页里有没有
if (!isPostBack)
{
//初始化处理
}
2,页面里有if(!isPostBack){}但注释后问题依,只有把整个if语句块给注释了才行。但我里面有身份验证呀。
if (!this.IsPostBack)
{
Server.Execute("val.aspx"); if (Request.Cookies["group"].Value == "0")
{
this.Response.Write(" <script language=javascript>alert('你不是超级管理员不能进入此页面!');window.window.location.href='right.aspx';</script> "); }
userBind();
}
去掉这里试试看
你可以先简化一下问题。建一个新页面,页面里面只有一个linkbutton,先试试一个的时候会不会出错。如果不会出现问题,你再逐步加入其它代码。这个办法是笨了一些但对那些莫名的问题还是很有好处的。相信不出一个小时就可以找到原因。
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
楼主就这么做吧,呵呵,感觉说得挺好的
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
楼主就这么做吧,呵呵,感觉说得挺好的
-----------------------------------------------------------------------
汗这么做更累人,我还是把所有Linkbutton换成button好了。这样还来的快些!结帖!