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

ASP.NETÒ³Ãæ¼ä´«Öµ·½·¨

Ò»¡¢Ä¿Ç°ÔÚASP.NETÖÐÒ³Ãæ´«Öµ¹²ÓÐÕâô¼¸ÖÖ·½Ê½£º
1¡¢±íµ¥Ìá½»£¬
   <form action= "target.aspx" method = "post" name = "form1">
<input name = "param1" value = "1111"/>
<input name = "param2" value = "2222"/>
   </form>
   ....
   form1.submit();
   ....
   ´ËÖÖ·½ÔÚASP¡£NETÖÐÎÞЧ£¬ÒòΪASP¡£NETµÄ±íµ¥×ÜÊÇÌá½»µ½×ÔÉíÒ³Ã棬Èç¹ûÒªÌá½»µ½±ðÒ»Ò³Ã棬ÐèÒªÌØÊâ´¦Àí¡£
2¡¢<A href="target.aspx?param1=1111&param2=2222">Á´½ÓµØÖ·´«ËÍ</A>
½ÓÊÕÒ³Ã棺 string str = Request["param1"]
3¡¢Session¹²Ïí
·¢ËÍÒ³Ã棺Session("param1") = "1111";
°´ÊÕÒ³Ãæ string str = Session("param1").ToString();
4¡¢Application¹²Ïí
·¢ËÍÒ³Ã棺 Application("param1") = "1111";  
°´ÊÕÒ³Ã棺 string str = Application("param1").ToString();
´ËÖÖ·½·¨²»³£Ê¹Óã¬ÒòΪApplicationÔÚÒ»¸öÓ¦ÓóÌÐòÓò·¶Î§¹²Ïí£¬ËùÓÐÓû§¿ÉÒԸı估ÉèÖÃÆäÖµ£¬¹ÊÖ»Ó¦ÓüÆÊýÆ÷µÈÐèҪȫ¾Ö±äÁ¿µÄµØ·½¡£
5¡¢Cookie
6¡¢Response.Redirect()·½Ê½
   Response.Redirect("target.aspx?param1=1111&param2=2222")
   ½ÓÊÕÒ³Ã棺 string str = Request["param1"]
7¡¢Server.Transfer()·½Ê½¡£
   Server.Transfer("target.aspx?param1=1111&param2=2222")
   ½ÓÊÕÒ³Ã棺 string str = Request["param1"]
¶þ¡¢Èç¹ûÔÚÁ½¸öÒ³Ãæ¼äÐèÒª´óÁ¿µÄ²ÎÊýÒª´«´«µÝ£¬ÈçÊý¾Ý²éѯµÈÒ³Ãæʱ£¬ÓÃ1 £­ 6µÄ·½·¨´«Öµ¼°Æä²»±ã£¬¶øµÚ 7 ÖÖ·½·¨È·ÓÐÒ»¶ÀÌصÄÓÅÊÆ£¡µ«Ê¹Óø÷½·¨Ê±ÐèÒªÒ»¶¨µÄÉèÖã¬ÏÖ¼òµ¥½éÉÜһϸ÷½·¨µÄʹÓ÷½Ê½£º
¡¡¡¡ÒÔ²éѯÊý¾ÝÒ³ÃæΪÀý£º
   ÔÚ²éѯҳÃæÖÐÉèÖÃÈçϹ«ÓÐÊôÐÔ(QueryPage.aspx)£º
    public class QueryPage : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox txtStaDate;
protected System.Web.UI.WebControls.TextBox txtEndDate;
   ...
/// <summary>
/// ¿ªÊ¼Ê±¼ä
/// </summary>
public string StaDate
{
get{ return this.txtStaDate.Text;}
set{this.txtStaDate.Text = value;}
}
/// <summary>
/// ½áÊøʱ¼ä
/// </summary>
public string EndDate
{
get{ return thi


Ïà¹ØÎĵµ£º

If Óï¾äÔÚASP.NETÖеÄÓ¦ÓÃ

If Óï¾äÔÚASP.NETÖеÄÓ¦ÓÃ
ÔÚASP.NETÖÐÓÐÐí¶àµØ·½ÒªÓõ½“ifÓï¾ä”£¬ÆäʵifÓï¾äÊÇC# ·ÖÖ§½á¹¹ ÖеÄÒ»ÖÖ¡£
·ÖÖ§½á¹¹ÊÇÓÐÌõ¼þµÄÖ´ÐдúÂ룬¿ØÖÆÏÂÒ»²½ÒªÖ´ÐÐÄÄЩ´úÂëµÄ¹ý³Ì¡£
·ÖÖ§½á¹¹£º
1£®ifÓï¾ä
2£®SwitchÓï¾ä
½ñÌìËù½²µÄÄÚÈÝΪif Óï¾ä£º
Ê×ÏÈC#ÖÐif½á¹¹µÄÓï·¨ÈçÏ£º
If (±í´ïʽ)
{
   ´úÂë¿ ......

Asp.NetÖÐWord,ExcelµÈoffice com×é¼þ²Ù×÷ȨÏÞµÄÎÊÌâ

½üÈÕÔÚ´ò¿ªÔ­À´Ð´µÄÒ»¸öÍøÒ³³ÌÐòÔËÐÐʱ£¬³öÏÖÁËExcel²Ù×÷ȨÏÞµÄÎÊÌ⣬¾ßÌåµÄ˵¾ÍÊÇÔÚ´úÂëÖе÷ÓÃÏÂÃæÕâ¶ÎÓëExcel²Ù×÷ÓйصÄÓï¾äʱ£¬
¡¡¡¡Application curExcelApp = new ApplicationClass();
¡¡¡¡ÌáʾȨÏÞ²»×㣬¾ßÌåµÄÌáʾÄÚÈÝÈçÏ£º
¡¡¡¡¼ìË÷ COM À๤³§ÖÐ CLSID Ϊ {00024500-0000-0000-C000-000000000046} µÄ×é¼þʱ ......

Asp.NetÖÐÑéÖ¤Õý¹æÔò±í´ïʽ

using System.Text.RegularExpressions;
Regex reg = new Regex(@"^\d+$"); //ÑéÖ¤×Ö·û´®
        Response.Write( reg.IsMatch(""));
        Response.Write(reg.IsMatch("sf"));
        Response.Write ......

Asp.netÒ¹»°Ö®Ò»£ºasp.net½éÉÜ


ÌâÍâ»°£ºÈ¥ÄêÖÁ½ñÄêÒÔÀ´£¬Â½Ðøд¹ýһЩԭ´´µÄÎÄÕÂÁË£¬ºÜ¶àÊǶÔÔ­À´Ëù×öÏîÄ¿µÄ×ܽᡣËùÒÔ²¢²»ÊǺÜϵͳºÜÈ«Ã棬¶¼ÊÇÕë¶Ôij¸ö֪ʶµã»òÕßij¸ö¾ßÌåÓ¦ÓÃдµÄ£¬ÓÐЩÅóÓѽ¨ÒéÎÒ°Ñ×Ô¼ºµÄÌå»áд³ÉÒ»¸öϵͳµÄ£¬Õâ´ÎËãÊÇÒ»¸ö³¢ÊÔ°É£¬Ð´µÃ²»ºÃµÄµØ·½Çë´ó¼Ò¾¡Á¿Å×Î÷ºìÊÁ²»Òª¶ª×©Í·¡£
Ö®ËùÒÔ°ÑÕâ¸öϵÁнÐ×ö¡¶asp.netÒ¹»°¡·£¬ÊÇÓÐÒ»Ð©Ô­Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ