惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - surprise

首次使用Ajax 一道Sql语句问题? 运用C#处理lob数据类型 (Oracle) 介绍一种Web上打印技术 Sql Server 中image类型迁移到Oracle 中Blob类型出现图片显示不出来,why????请博客们帮忙 在C#中存储Blob类型的数据, windows 2000下最多可以承受有多大容量外存???? 如何使用一个不错的图表组件WebChart(免费) 太爽了博客园有论坛了? 谁能帮我 WebChart组件的使用??? 能不能在博客园内建立一块开源区呀??? 如何在类库项目中添加配置文件?????? 中文版的hibernate pdf教程下载 用Nhibernate怎么实现数据的添加、删除、修改简单程序 介绍Nhibernate网站 俺现在碰到一些问题请大家帮忙??? 俺现在有个程序需要UTC转换为当地时间,哪位大虾会呀??? 我想问一下NHibernate的问题??? 10.1我发现一个非常好的架构NHibernate,我想和大家一起研究
大家看一下这是.net的漏洞还是程序有问题,我一时也没搞清,只知道这问题挺怪的 - surprise - 博客园
surprise · 2005-10-24 · via 博客园 - surprise
 

代码如下:

1.  WebForm1.aspx

<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="WebApplication4.WebForm1" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<HTML>

<HEAD>

<title>WebForm1</title>

        <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">

        <meta name="CODE_LANGUAGE" Content="C#">

        <meta name="vs_defaultClientScript" content="JavaScript">

        <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">

        <script language="javascript">

        function aa()

               {

               //document.all.Label1.innerHTML="Ok";

               //alert("aa");

               document.getElementById('Button2').click();

               }

</script>

</HEAD>

<body MS_POSITIONING="GridLayout">

        <form id="Form1" method="post" runat="server">

        <FONT face="宋体">

               <asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 304px; POSITION: absolute; TOP: 64px" runat="server"></asp:Label>

               <asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 360px; POSITION: absolute; TOP: 136px" runat="server"

               Text="Button1"></asp:Button>

               <asp:Button id="Button2" style="Z-INDEX: 103; LEFT: 320px; POSITION: absolute; TOP: 208px" runat="server"

               Text="Button2"></asp:Button></FONT>

</form>

</body>

</HTML>

2.  WebForm1.aspx.cs

Page_Load中

private void Page_Load(object sender, System.EventArgs e)

     {

          if(!IsPostBack)

         {

              this.Button1.Attributes.Add("onclick","aa()");

         }

}

添加事件Button2

private void Button2_Click(object sender, System.EventArgs e)

{

     this.Label1.Text="Ok";

}

代码非常简单
运行结果

单击”Button1”按钮,Button2事件中添加断点如下

是能够进入Button2事件的(应该说Label1的值是”Ok”

但结果会是

不知道Label1为空,为什么有谁可以解释一下吗??
源代码: