<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %><!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>无标题页</title>
<script type="text/javascript">
function pageLoad() {
}
</script>
<base target="_self">
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="1000">
</asp:Timer>
<br />
<br />
</ContentTemplate>
</asp:UpdatePanel>
</div>
<p>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</p>
</form>
</body>
</html>===================================using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ } protected void Timer1_Tick(object sender, EventArgs e)
{ Label1.Text = Label1.Text = "Panel refreshed at: " + DateTime.Now.ToLongTimeString();
}
}
}===============================
为何总是显示 __EVENTTARGET' 为空或不是对象 ?然后只能中断?
<head runat="server">
<title>无标题页</title>
<script type="text/javascript">
function pageLoad() {
}
</script>
<base target="_self">
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="1000">
</asp:Timer>
<br />
<br />
</ContentTemplate>
</asp:UpdatePanel>
</div>
<p>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</p>
</form>
</body>
</html>===================================using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;namespace WebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{ } protected void Timer1_Tick(object sender, EventArgs e)
{ Label1.Text = Label1.Text = "Panel refreshed at: " + DateTime.Now.ToLongTimeString();
}
}
}===============================
为何总是显示 __EVENTTARGET' 为空或不是对象 ?然后只能中断?
解决方案 »
- datalist问题
- 请问关闭浏览器或输入别的网址离开这个页面时才触发的js函数是什么??
- 【请教】用过SVG的朋友请帮忙看看window.createFile的问题,请指教
- 怎么上传flash动画?
- 设计数据表的基本原则
- FreeTextBox上传图片的路径怎么总是出错
- 急!我写一个timeout.aspx文件,在其它文件包它,没用!
- 新手请教SQL2008,ASP.NET+C#;VS2010
- 在ASP.NET怎样用那些ADO组建操作数据库?需要用哪些命名空间?
- 如何让一个dropdownlist里面绑定的数据有一个我指定的默认值
- asp.net alert弹框提示遇到的问题?
- 看了很多 还是没弄明白Session_end 这个事件
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
查看页面源文件