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

ASP.NET¸÷ÖÖ¿çÒ³Ãæ´«Öµ·½·¨¼¼ÇÉ×ܽá

ASP.NET¸÷ÖÖ¿çÒ³Ãæ´«Öµ·½·¨¼¼ÇÉ×ܽá
 
1.ʹÓÃQueryString±äÁ¿
    QueryStringÊÇÒ»Öַdz£¼òµ¥µÄ´«Öµ·½Ê½£¬Ëû¿ÉÒÔ½«´«Ë͵ÄÖµÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖС£Èç¹ûÊÇ´«µÝÒ»¸ö»ò¶à¸ö°²È«ÐÔÒªÇ󲻸߻òÊǽṹ¼òµ¥µÄÊýֵʱ£¬¿ÉÒÔʹÓÃÕâ¸ö·½·¨¡£µ«ÊǶÔÓÚ´«µÝÊý×é»ò¶ÔÏóµÄ»°£¬¾Í²»ÄÜÓÃÕâ¸ö·½·¨ÁË¡£ÏÂÃæÊÇÒ»¸öÀý×Ó£º
a.aspxµÄC#´úÂë
private void Button1_Click(object sender, System.EventArgs e)
{
string s_url;
s_url = "b.aspx?name=" + Label1.Text;
Response.Redirect(s_url);
}
b.aspxÖÐC#´úÂë
private void Page_Load(object sender, EventArgs e)
{
Label2.Text = Request.QueryString["name"];
}
2.ʹÓÃApplication ¶ÔÏó±äÁ¿
Application¶ÔÏóµÄ×÷Ó÷¶Î§ÊÇÕû¸öÈ«¾Ö£¬Ò²¾ÍÊÇ˵¶ÔËùÓÐÓû§¶¼ÓÐЧ¡£Æä³£Óõķ½·¨ÓÃLockºÍUnLock¡£
a.aspxµÄC#´úÂë
private void Button1_Click(object sender, System.EventArgs e)
{
Application["name"] = Label1.Text;
Server.Transfer("b.aspx");
}
b.aspxÖÐC#´úÂë
private void Page_Load(object sender, EventArgs e)
{
string name;
Application.Lock();
name = Application["name"].ToString();
Application.UnLock();
}
3.ʹÓÃSession±äÁ¿
Ïë±ØÕâ¸ö¿Ï¶¨ÊÇ´ó¼ÒʹÓÃÖÐ×î³£¼ûµÄÓ÷¨ÁË£¬Æä²Ù×÷ÓëApplicationÀàËÆ£¬×÷ÓÃÓÚÓû§¸öÈË£¬ËùÒÔ£¬¹ýÁ¿µÄ´æ´¢»áµ¼Ö·þÎñÆ÷ÄÚ´æ×ÊÔ´µÄºÄ¾¡¡£
a.aspxµÄC#´úÂë
private void Button1_Click(object sender, System.EventArgs e)
{
Session["name"] = Label.Text;
}
b.aspxÖÐC#´úÂë
private void Page_Load(object sender, EventArgs e)
{
string name;
name = Session["name"].ToString();
}
4.ʹÓÃCookie¶ÔÏó±äÁ¿
Õâ¸öÒ²ÊÇ´ó¼Ò³£Ê¹Óõķ½·¨£¬ÓëSessionÒ»Ñù£¬ÆäÊÇʲ¶Ôÿһ¸öÓû§¶øÑԵģ¬µ«ÊÇÓиö±¾ÖʵÄÇø±ð£¬¼´CookieÊÇ´æ·ÅÔÚ¿Í»§¶ËµÄ£¬¶øsessionÊÇ´æ·ÅÔÚ·þÎñÆ÷¶ËµÄ¡£¶øÇÒCookieµÄʹÓÃÒªÅäºÏASP.NETÄÚÖöÔÏóRequestÀ´Ê¹Óá£
a.aspxµÄC#´úÂë
private void Button1_Click(object sender, System.EventArgs e)
{
HttpCookie cookie_name = new HttpCookie("name");
cookie_name.Value = Label1.Text;
Reponse.AppendCookie(cookie_name);
Server.Transfer("b.aspx");
}
b.aspxÖÐC#´úÂë
private void Page_Load(object sender, EventArgs e)
{
string name;
name = Request.Cookie["name"].Value.ToString();
}


Ïà¹ØÎĵµ£º

¼´½«ÍƳöµÄASP.NET Ajax Library...

 ÓкܾÃÒ»¶Îʱ¼äÎÒµÄBLOGÉÏûÓгöÏÖAJAXÏà¹ØѶϢÁË£¬Ö÷Òªµ±È»ÊÇÒòΪ¾ø´ó²¿·ÖµÄÖØÐĶ¼·Åµ½ÁËSilverlightÉíÉÏ(¿ÉÔ¤ÆÚµÄδÀ´Ó¦¸ÃÒ²»áÊÇÈç´Ë)¡£
µ«ÓÉÓÚ¹¤×÷ÉϵÄÐèÒª£¬×î½ü»¹ÊÇ»ØÍ·¿´ÁËһϼ´½«ÍƳöµÄASP.NET Ajax Library...£¬Ë³±ãÕÒÁËÒ»ÏÂÍøÂçÉϵÄѶϢ£¬¿´Õâ¸ö̬ÊÆÎÒ²ÂÏëÓ¦¸Ã²»ÉÙASP.NET¿ª·¢ÈËÔ±ºöÂÔµôÁËÕâ¸öÆäʵÒѾ­bet ......

asp.net ÎÊÌâ,¼±!

±í¼ò½à
"¹«½»Ïß·Êý¾Ý¿â"
ÓõÄsqlÊý¾Ý¿â
admin±í
username
password
admin
admin
busroute ±í
³µ´Î
stop-name-id
Õ¾´Î
Ʊ¼Û
68
4
1
1
34
5
6
1.5
25
6
3
2
Õ¾µã±í
id
stop-name
1
»ð³µÕ¾
³µ´Î±í
id
³µ´Î
1
1
Èç¹ûÒªÓûùÓÚvb.netµÄasp.net±à³Ì
µÇ½µÄʱºò¸ÃÔõô±à³Ì°¡,Êý¾Ý¿âÊÇÓÃsql× ......

ASP.NET Login¿Ø¼þʹÓ÷½·¨¼°ÐëÖª(ͼ)

ASP.NETµÇ½¿Ø¼þ±È½Ï¶à£¬·â×°Á˴󲿷ÖWEBÓ¦ÓÃÖÐҪʵÏÖϵͳµÇ½µÄϵÁй¦ÄÜ£¬Éæ¼°µ½ºÜ¶à·½Ãæ¡£ÖÚ¶à ASP.NET µÇ¼¿Ø¼þÒ»ÆðΪ ASP.NET Web Ó¦ÓóÌÐòÌṩ¿É¿¿µÄÎÞÐè±à³ÌµÄµÇ¼½â¾ö·½°¸¡£Ä¬ÈÏÇé¿öÏ£¬µÇ¼¿Ø¼þÓë ASP.NET ³ÉÔ±×ʸñºÍ Forms Éí·ÝÑéÖ¤¼¯³É£¬ÒÔ°ïÖúʹÍøÕ¾µÄÓû§Éí·ÝÑéÖ¤¹ý³Ì×Ô¶¯»¯¡£Ä¬ÈÏÇé¿öÏ£¬ASP.NET µÇ¼¿Ø¼þÒÔ´¿ ......

ASP.NETµÄWeb.configÎļþ

Web.configÎļþÊÇÒ»¸ö±ê×¼µÄXMLÎĵµ£¬ËùÓеÄÅäÖÃÐÅÏ¢¶¼Î»ÓÚ<configuration>±ê¼ÇÄÚ¡£<system.web>±ê¼ÇÄÚÔò°üº¬Á˺ËÐÄASP.NETÅäÖÃÉèÖá£Óû§¿ÉÒÔÔÚVisual Studio.NETÖдò¿ªWeb.configÀ´²é¿´ºÍ±à¼­ËüµÄÄÚÈÝ£¬Õâ¸öÎļþÖаüº¬ÁË´óÁ¿µÄ×¢ÊÍÐÅÏ¢£¬Óû§¿ÉÒÔ²ÎÕÕѧϰ¡£ÏÂÃæ½éÉܼ¸¸ö³£Óõıê¼Ç¡£
1. <appSettings> ......

Asp.NetÇå¿ÕÒ³ÃæËùÓÐtextboxµÄ¼¸ÖÖ·½·¨×ܽá

Asp.NetÇå¿ÕÒ³ÃæËùÓÐtextboxµÄ¼¸ÖÖ·½·¨×ܽá
 ÔÚAsp.NetÖÐÇå¿ÕËùÓÐtextboxÓкü¸ÖÖ·½·¨£¬±¾ÎÄÌṩ¼¸ÖÖ£¬¹©´ó¼Ò²Î¿¼£¡
 
foreach( Control childControl in this.Controls )  
{  
if( childControl is TextBox )  
((TextBox)childControl).Text = "";  
}&n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ