易截截图软件、单文件、免安装、纯绿色、仅160KB

欢迎您学习 asp.net 2.0

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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 id="Head1" runat="server">
<title>无标题页</title>
<mce:style type="text/css"><!--
body{font-size:9pt;font-family:Verdana;color:#666666;}
a:link{text-decoration: none;color: #696969;}
a:visited{text-decoration: none;color: #696969;}
a:active{text-decoration: none;color: #696969;}
a:hover{text-decoration: underline;color: #0000CC;}
--></mce:style><style type="text/css" mce_bogus="1">body{font-size:9pt;font-family:Verdana;color:#666666;}
a:link{text-decoration: none;color: #696969;}
a:visited{text-decoration: none;color: #696969;}
a:active{text-decoration: none;color: #696969;}
a:hover{text-decoration: underline;color: #0000CC;}</style>
</head>
<body>
<form id="form1" runat="server">
<div><asp:Label ID="Label1" Height="51px" width="614px" runat="server"></asp:Label></div>
<div>
请输入你的姓名:<asp:TextBox runat="server" ID="TextBox1"></asp:TextBox>
<asp:Button runat="server" ID="Button1" Text="确定" style="width:60px" OnClick="Button1_Click" />
</div>
</form>
</body>
</html>
Default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
this.Label1.Text = this.TextBox1.Text;
this


相关文档:

ASP.NET中javascript与c#互相访问

下面要解决的问题如下:
       1.如何在JavaScript访问C#函数?
  2.如何在JavaScript访问C#变量?
  3.如何在C#中访问JavaScript的已有变量?
  4.如何在C#中访问JavaScript函数?
  问题1答案如下:
  javaScript函数中执行C#代码中的函数:
  方法一:
  &nbs ......

ASP.NET常用代码

http://www.chinaz.com/Program/.NET/101U1142006.html
  1. 打开新的窗口并传送参数:
传送参数:
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
接收参数:
string a = Request.QueryString("id");
string b = Request.QuerySt ......

ASP.NET中常用的三十三种代码


 1. 打开新的窗口并传送参数:
传送参数:
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")
接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.为按钮添加对话框
Button1.Attribute ......

ASP.NET的五大数据控件浅谈

欢迎进入.NET社区论坛,与200万技术人员互动交流 >>进入
ASP.NET 数据控件:GridView,DataList,Repeater ,DetailsView,FormView。
ASP.NET 数据控件综述:
1.前3个用于呈现多条记录,后面2个用于呈现单条数据明细,即常用的记录明细。
2.GridView和DetailsView控件的布局固定,自定义数据显示的布局功能有限,一般 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号