Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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»ñÈ¡URLµØÖ·

Èç¹û²âÊÔµÄurlµØÖ·ÊÇhttp : //www.test.com/testweb/default.aspx, ½á¹ûÈçÏ£º
Request.ApplicationPath: /testweb
Request.CurrentExecutionFilePath: /testweb/default.aspx
Request.FilePath: /testweb/default.aspx
Request.Path: /testweb/default.aspx
Request.PhysicalApplicationPath: E:\WWW\testwebReq ......

GDI+Öз¢ÉúÒ»°ãÐÔ´íÎó(asp.net(C#))

×î½ü×ö±£´æÔ¶³ÌͼƬʱºò£¬¾ÍÔÚ±£´æµÄʱºò×ÜÊdzöÕâ¸ö´íÎó£¬ÍøÉÏgoogleÁËһȦ£¬¶¼ÊÇÔÙ˵ȨÏÞÎÊÌ⣬ÎÊÌâÎÒÊÇÓÃUÅÌ£¬ÄÄÀïÓÐʲôȨÏÞÎÊÌâ¡£
×îºóÎÞÒâÖз¢ÏÖÁËÎÊÌâËùÔÚ
±£´æµÄʱºò²»ÄÜÓÃÏà¶Ô·¾¶£¬Ò»¶¨ÒªÓÃserver.mappath()´¦Àíһϱ£´æµÄ·¾¶¡£¡£¡£°¦£¡ ......

asp.net¶ÁÈ¡exclÖеÄÊý¾Ý¡¾×ª¡¿

¾­³£ÐèÒªÔÚÊý¾Ý¿âÓëExeclÖ®¼ä»¥µ¼Êý¾Ý¡£netʱ´ú£¬ADO.NET¿ÉÒÔʹÓÃʹÓÃMicrosoft.Jet.OleDb·ÃÎÊ·ÃÎÊExcel£¬ÍøÉÏÒѾ­ÓкܶàÀàËƵÄ×ÊÔ´£¬×îµäÐÍÒ²ÊÇ×î¼òµ¥µÄ¿ÉÄÜÈçÏ£º£¨asp.net»·¾³£©
 // Á¬½Ó×Ö·û´®           
        ......

asp.net±¸·ÝÊý¾Ý¿â


Asp.Net ±¸·ÝºÍ»Ö¸´SQL SERVER Êý¾Ý¿â
   ÎÒÃÇͨ³£±¸·ÝÊý¾Ý¿âʱ£¬ÐèÒªµÇ¼Êý¾Ý¿â·þÎñÆ÷È¥±¸·ÝºÍ»Ö¸´£¬ÕâÑùºÜ²»·½±ã£¬ÆäʵSQL SERVER×Ô´øµÄÃüÁî¿ÉÄÜÈÃÎÒÃǺܼòµ¥µØʵÏÖÔ¶³Ìͨ¹ýAsp.Net±¸·ÝºÍ»Ö¸´Êý¾Ý¿â¡£
BACKUP DATABASE '±»±¸·ÝµÄÊý¾Ý¿âÃû' TO DISK = '±¸·ÝÎļþ·¾¶';
ALTER DATABASE '±»»Ö¸´µÄÊý¾Ý¿âÃû' ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ