Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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½ûÖ¹Ò³ÃæË¢Ðµ¼ÖÂÖØ¸´Ìá½»

ÍøÉÏÕÒµ½µÄÒ»¸ö°ì·¨£¬Ò²¿ÉÒÔ½â¾ö Óûسµ¼ü´úÌæÌá½»°´Å¥Ê±£¬Óû§³£°´»Ø³µ£¨·Ç³£¿ìËÙµÄµã»Ø³µ£©µ¼ÖÂÖØ¸´Ìá½»µÄÇé¿ö£º 
public class SubmitOncePage : System.Web.UI.Page
    {
        private string _strSessionKey;
      &n ......

ASP.NETÒ³ÃæÉúÃüÖÜÆÚ

  ÓкܶàÀíÓÉÈ¥½âÊÍÀí½âASP.NETÒ³ÃæÉúÃüÖÜÆÚÊǷdz£ÖØÒªµÄ£¬Ö÷ÒªÊÇҪȥÀí½âʲôµØ·½·ÅÖÃÊ²Ã´ÌØ¶¨µÄ·½·¨£¬Ê²Ã´Ê±ºòÎÒÃÇÓ¦¸ÃÉèÖÃʲôÏà¹ØµÄÊôÐÔ¡£Èç¹ûÈ¥¿ª·¢×Ô¶¨ÒåµÄ·þÎñÆ÷¿Ø¼þ£¬Àí½âÉúÃüÖÜÆÚ¶Ô¾ÀÕý¿Ø¼þ³õʼ»¯Ê±ºòµÄ´íÎó£¬ÒÔ¼°Ê¹ÓÃview-stateºÍºǫ́´úÂëÉèÖÃÊôÐÔÊǷdz£ÓÐÓõġ££¨¿Ø¼þʼþÖ»ÓëASP.NETÒ³ÃæÏà¹Ø£©
 &nb ......

asp.net È¥µôviewstate

½â¾ö°ì·¨£ºapp_code/ ´æ·ÅÒ»¸öÀà ÓÃÀ´½Ø»ñHTTP
1.´úÂëÈçÏÂ
using System;
using System.IO;
using System.Web;
using System.Text;
using System.Text.RegularExpressions;
/// <summary>
/// Removes whitespace from the webpage.
/// </summary>
public class ViewstateModule : IHttpModule
{
......

Asp.Net ¹¹¼Ü(HttpModule ½éÉÜ)

http://www.cnblogs.com/JimmyZhang/archive/2007/11/25/971878.html
ÒýÑÔ
Http ÇëÇó´¦ÀíÁ÷³Ì ºÍ Http Handler ½éÉÜ ÕâÁ½ÆªÎÄÕÂÀÎÒÃÇÊ×ÏÈÁ˽âÁËHttpÇëÇóÔÚ·þÎñÆ÷¶ËµÄ´¦ÀíÁ÷³Ì£¬ËæºóÎÒÃÇÖªµÀHttpÇëÇó×îÖÕ»áÓÉʵÏÖÁËIHttpHandler½Ó¿ÚµÄÀà½øÐд¦Àí(Ó¦¸Ã¼ÇµÃPageÀàʵÏÖÁËIHttpHandler)¡£´Ó Http ÇëÇó´¦ÀíÁ÷³Ì Ò»ÎĵÄ×îºóµÄ ......

ʹÓÃ×Ô¶¨ÒåÕ¾µãµØÍ¼Ìṩ³ÌÐò¿ØÖÆASP.NETµÄ²Ëµ¥

         ASP.NETÌṩµÄÕ¾µãµØÍ¼ÎªÎÒÃǽ¨Á¢µ¼º½À¸ºÍ²Ëµ¥ÌṩÁ˼«´óµÄ·½±ã¡£´ËÍâÎÒÃÇ»¹¿ÉÒÔ½¨Á¢×Ô¼ºµÄÕ¾µãµØÍ¼Ìṩ³ÌÐò£¬´Ó¶øÊ¹ÎÒÃǵIJ˵¥Ïî¿É¿Ø¡£
 
    ÏÈÀ´Á˽âÏÂmenuµÈµ¼º½¿Ø¼þÓëÕ¾µãµØÍ¼µÄ¹ØÏµ¡£ÎÒÃÇÔÚASP .NETÏîÄ¿ÖÐËù½¨Á¢µÄweb.siteMap Æäʵ¾ÍÊÇÒ»¸ö× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ