易截截图软件、单文件、免安装、纯绿色、仅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链接Access数据库字符串正确方法

在web  config中  作如下配置:
<connectionStrings>
    <add name="ydycon" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=|DataDirectory|ydy.mdb" providerName="System.Data.OleDb"/>
 
  </connectionStrings>
在.net文件中应用链接 ......

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 MVC介绍

The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating MVC-based Web applications. The ASP.NET MVC framework is ......

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下后台常用分页解决方案的思考

SQL
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go


--阿会楠sosuo8.com根据网络上的代码进行了修改,版权归原作者所有2009-4-5
--阿会楠做了一次升级,2009-9-27
--修改输出总记录数

ALTER PROCEDURE [dbo].[pagination]
@tblName nvarchar(1000), -- 表名
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号