高手请进,超难 error ? show more info 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 webform1.aspx<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="hello.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"> </HEAD> <body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> <h1>DllTest - Ex3(例3)</h1> <hr> <asp:label runat="server" id="NoteLabel" style="FONT-WEIGHT:bold; COLOR:red" /> <input runat="server" id="f_Name" size="8" NAME="f_Name"> <button runat="server" onserverclick="OnNameSubmit" ID="Button1" type="button"> 确定</button> <asp:Button id="Button2" runat="server" Text="OnClick"></asp:Button> </form> </body></HTML>WebForm1.aspx.csusing System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;namespace hello{ /// <summary> /// WebForm1 的摘要说明。 /// </summary> public class WebForm1 : System.Web.UI.Page { protected System.Web.UI.WebControls.Label NoteLabel; protected System.Web.UI.HtmlControls.HtmlInputText f_Name; protected System.Web.UI.WebControls.Button Button2; protected System.Web.UI.HtmlControls.HtmlButton Button1; private void Page_Load(object sender, System.EventArgs e) { // 在此处放置用户代码以初始化页面 if( !IsPostBack ) NoteLabel.Text = "请输入您的姓名:"; } protected void OnNameSubmit(Object src, EventArgs args) { string name = f_Name.Value; NoteLabel.Text = (name=="") ? "姓名不能为空" : name +",您好。欢迎光临!"; } #region Web 窗体设计器生成的代码 override protected void OnInit(EventArgs e) { // // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。 // InitializeComponent(); base.OnInit(e); } /// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// </summary> private void InitializeComponent() { this.Load += new System.EventHandler(this.Page_Load); } #endregion }}在加了webform1.aspx文件加入<script runat=server>123123</script>后的到aspx的编译文件文件里多加了(比vs2002)protected ASP.Global_asax ApplicationInstance { get { return ((ASP.Global_asax)(this.Context.ApplicationInstance)); } }注释后可编译,按照文章的方法,报错 源文件http://220.163.11.52/hello.rar 图片翻页 两个数据库的问题 asp.net权限管理如何实现 急需帮忙,Gridview里面弹出日历问题 怎样将一个字符串转化为一个字节数组? Directory的问题 js脚本的一些问题 datagrid 翻页后删除行数据问题 急,asp.net读取asp的cookies乱码问题,大家帮帮忙啊!在线等待,立即结帖 新手,Dropdownlist的一个简单问题,要吐血了! 改变文本的值,但是显示的不完全,只显示一部分,这个问题如何解决?请海波.net和思归兄进来看看。 name = (string)prams[6].Value;
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="hello.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">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<h1>DllTest - Ex3(例3)</h1>
<hr>
<asp:label runat="server" id="NoteLabel" style="FONT-WEIGHT:bold; COLOR:red" />
<input runat="server" id="f_Name" size="8" NAME="f_Name"> <button runat="server" onserverclick="OnNameSubmit" ID="Button1" type="button">
确定</button>
<asp:Button id="Button2" runat="server" Text="OnClick"></asp:Button>
</form>
</body>
</HTML>WebForm1.aspx.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;namespace hello
{
/// <summary>
/// WebForm1 的摘要说明。
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label NoteLabel;
protected System.Web.UI.HtmlControls.HtmlInputText f_Name;
protected System.Web.UI.WebControls.Button Button2;
protected System.Web.UI.HtmlControls.HtmlButton Button1;
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
if( !IsPostBack ) NoteLabel.Text = "请输入您的姓名:";
} protected void OnNameSubmit(Object src, EventArgs args)
{
string name = f_Name.Value;
NoteLabel.Text = (name=="") ? "姓名不能为空" : name +",您好。欢迎光临!";
} #region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load); }
#endregion
}
}在加了webform1.aspx文件加入<script runat=server>123123</script>
后的到aspx的编译文件
文件里多加了(比vs2002)
protected ASP.Global_asax ApplicationInstance {
get {
return ((ASP.Global_asax)(this.Context.ApplicationInstance));
}
}
注释后可编译,按照文章的方法,报错
http://220.163.11.52/hello.rar