Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASP.NET µÇ¼½çÃæ

//default.aspx.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Runtime.InteropServices;
using System.Configuration;
using System.Web.UI.WebControls;
using System.Web.Services.Description;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Button4.Attributes.Add("onclick", "window.open('Register.aspx')");//ͨ¹ýbutton4´ò¿ªÁ´½Ó
string strConnection = ConfigurationManager.AppSettings["Str.Properties.Settings.masterConnectionString"].ToString();
SqlConnection objConnection = new SqlConnection(strConnection);
objConnection.Open();
SqlCommand cmd = new SqlCommand("select * from judging where name='" + TextBox1.Text.Trim() + "'", objConnection);
string sql = "select * from judging where name='" + TextBox1.Text + "'and password='" + TextBox2.Text + "'";
cmd.CommandText = sql;
/*
***********************************************************************************************
*ÅжÏÊÇ·ñÓдËID,ExecuteScalar() return the first column of the first row in the result set.
*/
if (cmd.ExecuteScalar() == null)//ÎÞ´ËÓû§
{
Label1.Text = "Sorry, please check your id and psw";
Button3.Visible = false;
}
else
{
Label1.Text ="Welcome to "+TextBox1.Text;
Button3.Visible = true;
}

}
protected void Button1_Click(object sender, EventArgs e)
{
Panel1.Visible = false;
Panel2.Visible = true;
}
protected void Button4_Click(object sender, EventArgs e)
{

}
protected void Button3_Click(object sender, EventArgs e)


Ïà¹ØÎĵµ£º

ASP.NET´ò¿ªÐÂÒ³Ãæ¶ø²»¹Ø±ÕÔ­À´µÄÒ³Ãæ

ASP.NET´ò¿ªÐÂÒ³Ãæ¶ø²»¹Ø±ÕÔ­À´µÄÒ³Ãæ
Respose.Write("<script     language='javascript'>window.open('"+     url     +"');</script>"); £¨´ò¿ª¼ò½à´°¿Ú£©£º
Respose.Write("<script     l ......

ASP.NET 2.0»º´æ

Ò»¡¢Ò³Êä³ö»º´æ
1.ÉèÖÃ ASP.NET
Ò³»º´æµÄÁ½ÖÖ·½Ê½
1.1
ÒÔÉùÃ÷·½Ê½ÉèÖà ASP.NET Ò³µÄ»º´æ
ÒÔÉùÃ÷·½Ê½ÉèÖà ASP.NET
Ò³µÄ»º´æµÄ·½·¨ÊÇÔÚÒ³ÖÐʹÓà @ OutputCache Ö¸ÁËüµÄ³£ÓÃÊôÐÔÈçÏ£º
³ÌÐò´úÂë
<%@ OutputCache Duration="" VaryByParam=""
VaryByControl="" VaryByHeader ......

ASP.NETÒ³Ãæ´«Öµ

½éÉÜ£º
 
 ÔÚÍøÒ³Ó¦ÓóÌÐòµÄ¿ª·¢ÖУ¬Ò³ÃæÖ®¼äµÄ´«ÖµÓ¦¸ÃÊÇ×î³£¼ûµÄÎÊÌâÁË¡£ ÔÚÕâÆªÎÄÕÂÀazamsharp ½«ÎªÎÒÃǽéÉÜһЩASP.NETÒ³Ãæ´«ÖµµÄ·½Ê½¡£±¾ÎÄËù¾ÙµÄÀý×ӷdz£¼òµ¥£¬½ö½ö°üº¬ÁËÒ»¸öÎı¾¿òºÍ¼¸¸ö°´Å¥£¬µ±°´Å¥µã»÷ʱÎı¾¿òÖеÄ×Ö·û´®½«»áÒÔ²»Í¬µÄ·½Ê½´«µÝµ½ÁíÍâµÄÒ³ÃæÈ¥¡£
 
1. Response.Redirect £¨» ......

½â¾öASP.NETÉÏ´«Îļþ´óСÏÞÖÆ

Ò»¡¢ÐÞ¸ÄÅäÖÃWeb.ConfigÎļþÖеÄhttpRuntime½Úµã
¶ÔÓÚasp.net,ĬÈÏÖ»ÔÊÐíÉÏ´«4MÎļþ,Ôö¼ÓÈçÏÂÅäÖÃ,Ò»°ã¿ÉÒÔ×Ô¶¨Òå×î´óÎļþ´óС.
Ò»¡¢ÐÞ¸ÄÅäÖÃWeb.ConfigÎļþÖеÄhttpRuntime½Úµã
¶ÔÓÚasp.net,ĬÈÏÖ»ÔÊÐíÉÏ´«4MÎļþ,Ôö¼ÓÈçÏÂÅäÖÃ,Ò»°ã¿ÉÒÔ×Ô¶¨Òå×î´óÎļþ´óС.
<httpRuntime
executionTimeout="800"
maxRequestLengt ......

Win7ÏÂÅäÖÃIIS½Å±¾Ó³ÉäʵÏÖAsp.NetµÄHttp¹ÜµÀ³ÌÐò

 
       Asp.Net³ÌÐòµÄ¸ß¼¶¹¦ÄÜ£¬Óкܶ඼ÊÇ»ùÓÚIHttpHandler½Ó¿ÚÀ´ÊµÏֵģ¬ÔÚWinwods Server 2003 Ï£¬ÅäÖÃIIS6µÄ Web·þÎñÀ©Õ¹·Ç³£¼òµ¥¡£×î½üÓÃWin7+IIS7.5µÄÈËÔ½À´Ô½¶à£¬ÔÚÕâ¸ö»·¾³ÏÂÅäÖÃAsp.NetµÄWeb·þÎñÀ©Õ¹¾ÍÓÐЩÂé·³¡£ÒÔÏÂÄÚÈÝ£¬¾ÍÊÇÔÚWin7ºÍIIS7.5»·¾³ÏÂÅäÖùý³Ì¡£
 
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ