ASP.NET Ò³Ãæ´«Öµ·½·¨»ã×Ü
ÔÚ×öWEBϵͳ¿ª·¢Ê±£¬Ã¿Ã¿Óöµ½Ò³Ãæ´«ÖµµÄÎÊÌⶼÊÇÔÚʹÓÃ×î¼òµ¥µÄGET·½Ê½À´´«Öµ£¬Èç¹ûÐÅÏ¢Á¿±È½ÏÉÙ²¢ÇÒÓÖ²»Éæ¼°°²È«ÎÊÌâµÄ»°
»¹¿ÉÒÔÓ¦¸¶Ò»Ï£¬µ«ÊÇ´«µÝ´óÁ¿Êý¾Ý¡¢Ãô¸ÐÊý¾ÝµÄʱºò.....
ÏÂÃæ¾ÍASP.NETÖÐÒ³Ãæ´«Öµ·½Ê½×ö¸ö»ã×Ü£¬ÒÔ±¸²»Ê±Ö»Ðè
1¡¢GET´«Öµ·½Ê½
·¢ËÍÒ³Ã棺
<a href="WebReceivePage.aspx?Id=1">½øÈë½ÓÊÜÒ³Ãæ</a>
½ÓÊÜÒ³Ãæ WebReceivePage.cs
if(!string.IsNullorEmpty(Request.QueryString["Id"]))
{
//´¦Àí´úÂë
}
2¡¢Post·½Ê½
POST·½Ê½ºÍGET·½·¨µÄ×î´óÇø±ð¾ÍÊÇ°Ñ·¢Ë͵ÄÊý¾ÝºÍURIµØÖ··ÖÀë¡£ÇëÇó²ÎÊýÊÇÔÚhttp±êÌâµÄÒ»¸ö²»Í¬²¿·Ö£¨ÃûΪentity body£©´«ÊäµÄ£¬Í¬Ê±POST´«Öµ·½Ê½ÀíÂÛÉÏûÓдóСÏÞÖÆ¡£
<form>
<input name="str" type="text" value="kewin string" />
<input type="submit" value="POST ´«Öµ" />
</form>
½ÓÊÜÒ³Ãæ cs´úÂë
if(!string.IsNullorEmpty())
{
txtReceive.Text=Request.Form["str"];
}
//formÖв»Äܹ»ÓÐ runat="server" ·ñÔòPost²»Æð×÷Óã¬Èç¹ûʹÓÃrunat="server"Ôò¿ÉÒÔ ÁíÍ⸽¼ÓÒ»¸öform ͨ¹ýbuttonµ÷ÓÃ
//JavaScriptµÄ·½Ê½ form.action="Receiver.aspx"; form.submit();
//¡¶ÀîÌìƽ .NETÉîÈëÌåÑéÓëʵս¾«Òª¡· P143
3¡¢Ê¹ÓÃSession ºÍApplication
·¢ËÍÒ³ SendPage.cs
Session["Str"]="String Test";
//Application["Str"]="String Test";
Server.Transfer("ReceivePage.aspx");//Server.Transfer() ·½·¨Ö±½ÓÔÚ·þÎñÆ÷ÉÏÃæÖ´ÐÐÒ³Ãæ¿ØÖÆȨתÒÆ£¬´ËÆÚ¼äRequest¡¢ SessionµÈ±£³Ö²»±ä
½ÓÊÜÒ³Ãæ ReceivePage.cs
string Str=Session["Str"];
Ïà¹ØÎĵµ£º
1¡¢<%=%> ÀïÃæ·ÅµÄ±äÁ¿Ãû£¬È磺
<div>
<h1>Hello World</h1>
<p>Welcome to Beginning ASP.NET 3.5 on <%=
DateTime.Now.ToString() %></p>
</div>
Êä³ö½á¹ûΪ£º
Hello World
Welcome to Beginning ASP.NET 3.5 on 2009-11-10 15:53:08
2¡¢ <%#%> ÕâÀïÊÇÊ ......
ASP.NET´¦Àí³ÌÐòºÍÄ£¿é
ASP.NET HTTP ´¦Àí³ÌÐò(Handler)ÊÇÏìÓ¦¶Ô ASP.NET Web Ó¦ÓóÌÐòµÄÇëÇó¶øÔËÐеijÌÐò
Èç´¦Àí *.aspxÎļþµÄASP.NET´¦Àí³ÌÐò ......
Backup.aspx
protected void Button1_Click(object sender, EventArgs e)
{
string path = Server.MapPath("") + @"\Backup";
if (!Directory.Exists(path))
......
´´½¨ºÍÅäÖÃASP.NET Session״̬Êý¾Ý¿â
ÔÚ»ùÓÚNLB£¨ÍøÂ縺ÔØƽºâ£©»·¾³ÏµÄASP.NET WebÓ¦ÓóÌÐò¿ª·¢£¬ÎÒÃÇÐèÒª½«Session´æ´¢ÔÚÊý¾Ý¿âÖ驶à¸öWebÓ¦ÓóÌÐòµ÷Óã¬ÒÔÏÂΪÅäÖ÷½·¨¼°×¢ÒâÊÂÏî¡£
1.´´½¨ÓÃÓÚ´æ´¢ASP.NET SessionµÄÊý¾Ý¿â£¨Ô¶³Ì¡¢±¾µØ½Ô¿É£¬Ê¹ÓÃÊý¾Ý¿âÓû§Éí·ÝÈÏÖ¤£©
ÔÚWindows\Microsoft.NET\Framework/V2.0.507 ......
static void Main(string[] args)
{
string connstr = "Data Source=***;user=system;password=***;";
OracleConnection conn = new OracleConnection(connstr);
conn.Open();
string orclstr="insert into SYS.A_MODULE values('03','²é¿´Éú²úÈÎÎñ','²é¿´Éú²úÈÎÎñ½ø¶È')";
  ......