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

Asp.netÔÚȨÏÞÇý¶¯Ï¶¯Ì¬Éú³É²Ëµ¥µÄÁ½ÖÖ·½·¨

ÕâЩÄÚÈݱȽϼòµ¥£¬µ«ÊDZȽÏÈÝÒ×Íü¼Ç¡£ÌØдÏÂÀ´°ïÖú¼ÇÒ䣺£¨ÕâÀïÓõÄÊÇTreeViewºÍXmlDataSource°ó¶¨µÄÀý×Ó£©
µÚÒ»ÖÖ£º¶ÔÊôÐÔµÄÖµÖ±½Ó½øÐа󶨡£
     Ê×ÏÈ £ºÀ­Ò»¸öTreeViewµ½Ò³ÃæÉÏ£¬IDÃüÃûΪ"TrvLeft"¡£È»ºóÔÚºǫ́½øÐа󶨣¬
´úÂëÈçÏ£º
     XmlDataSource XmlDb = new XmlDataSource();
        XmlDb.DataFile = "Menu.xml";
        trvLeft.DataSource = XmlDb;
        TreeNodeBinding tnb = new TreeNodeBinding();
        tnb.DataMember = "MenuItem";
        tnb.TextField = "Text";
        tnb.NavigateUrlField = "NavigateUrl";
        tnb.ImageUrlField = "ImageUrl";
        trvLeft.DataBindings.Add(tnb);
        trvLeft.DataBind();
ÆäÖÐMenu.xmlµÄÄÚÈÝÈçÏ£º
  <?xml version="1.0" encoding="utf-8" ?>
<MenuItem Text="Ö÷²Ëµ¥" NavigateUrl="Index.aspx" ImageUrl="main.gif">
  <MenuItem Text="Ò»¼¶²Ëµ¥" NavigateUrl="#" ImageUrl="Images/1.gif">
    <MenuItem Text="¶þ¼¶²Ëµ¥" NavigateUrl="#" ImageUrl="Images/1.gif"></MenuItem>
    <MenuItem Text="¶þ¼¶²Ëµ¥" NavigateUrl="#" ImageUrl="Images/1.gif"></MenuItem>
     </MenuItem>
</MenuItem>
<MenuItem Text="Ö÷²Ëµ¥" NavigateUrl="Index.aspx" ImageUrl="main.gif">
  <MenuItem Text="Ò»¼¶²Ëµ¥" NavigateUrl="#" ImageUrl="Images/1.gif">
    <MenuItem Text="¶þ¼¶²Ëµ¥" NavigateUrl="#" ImageUrl="Images/1.gif"></MenuItem>
    <MenuItem Text="¶þ¼¶²Ëµ¥" NavigateUrl="#" ImageUrl="Images/1.gif"></MenuItem>
     </MenuItem>
</MenuItem>
µÚ¶þÖÖ£ºµÝ¹éÊ÷²éѯ¸³Öµ£º
 public void Bind()


Ïà¹ØÎĵµ£º

ASP.NET µÄһЩ³£Óü¼Çɱ¸Íü1

1 »ñÈ¡´íÎóÐÅÏ¢²¢µ½Ö¸¶¨Ò³Ã治ҪʹÓÃResponse.Redirect,¶øÓ¦¸ÃʹÓÃServer.Transfer
e.g
// in global.asax
protected void Application_Error(Object sender, EventArgs e) {
if (Server.GetLastError() is HttpUnhandledException)
Server.Transfer("MyErrorPage.aspx");
//ÆäÓàµÄ·ÇHttpUnhandledExceptio ......

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»ñÈ¡ÌìÆøÔ¤±¨´óÖ·ÖÎöÓÐ 1µ½Ä³¸öÍøÕ¾ÉÏ·ÖÎöÍøÕ¾µÄ´úÂë»ñÈ¡£»2×Ô¼ºÐ´Çý¶¯·þÎñºÍweb·þÎñ  µÚ¶þÖÖˮ̫Éî²»ÔøÉæ¼°¡£
ASP.NETºǫ́³ÌÐò»ñÈ¡ÖÐÑëÆøÏǫ́ÌìÆøÔ¤±¨
1.ÌìÆø·â×°³ÉÒ»¸öʵÌå
2.¿ÉÒÔ»ñÈ¡µ±ÌìÌìÆø£¬Ò²¿ÉÒÔ»ñȡδÀ´ÎåÌìµÄÌìÆø¼¯ºÏ
using System;
using System.Collections.Generic;
using System.Text;
......

ASP.NETʹÓÃRequest»ñÈ¡À´Ô´ÍøÖ·URL²ÎÊý

Request¶ÔÏó¹¦ÄÜÊÇ´Ó¿Í»§¶ËµÃµ½Êý¾Ý£¬³£ÓõÄÈýÖÖÈ¡µÃÊý¾ÝµÄ·½·¨ÊÇ£ºRequest.Form¡¢Request.QueryString£¬Request¡£ÆäµÚÈýÖÖÊÇÇ°Á½ÖÖµÄÒ»¸öËõд£¬¿ÉÒÔÈ¡´úÇ°Á½ÖÖÇé¿ö¡£¶øÇ°Á½ÖÖÖ÷Òª¶ÔÓ¦µÄFormÌύʱµÄÁ½ÖÖ²»Í¬µÄÌá½»·½·¨£º·Ö±ðÊÇPost·½·¨ºÍGet·½·¨¡£
        Request ¶ÔÏóµÄÊôÐԺͷ½·¨± ......

IISÖÐASP.netµ÷ÊÔ³öÏÖ½ø³Ì±»´ò¶ÏµÄµ÷Õû

 
·ÖÀà: ר¼ÒBlog ÍƼöÕߣºadmin| ä¯ÀÀÁ¿£º489 views| 1 ¸öÆÀÂÛ
Èç¹ûÎÒÃÇÓÃIISËÞÖ÷ASP.net£¬µ¥²½µ÷ÊÔʱ£¬»áÓпÉÄÜÏÂÃæµÄÒì³£±¨³öÀ´£º
—————————
Microsoft Visual Studio
—————————
The web serv ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ