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

Cascading DropDownLists With ASP.NET and jQuery


Cascading drop down lists is a really nice feature for web developers. I thought it was time to write an article on how to do this using ASP.NET and jQuery. Well here’s one way of doing it. Before we get started, this example uses the latest version of jQuery which is 1.3.2. That can be downloaded from here. 
Open Visual Studio 2008 and create a new Web Application. For this article I’m not going to connect to a database. I’ve created two classes, Employee and EmployeeCars, which will store the data. Create two new classes and add the following code:
C#
public class Employee
   {
        public int Id { get; set; }
        public string GivenName { get; set; }
        public string Surname { get; set; }
 
        public List<Employee> FetchEmployees()
        {
            return new List<Employee>
                       {
                           new Employee {Id = 1, GivenName = "Tom", Surname = "Hanks"},
                           new Employee {Id = 2, GivenName = "Tiger", Surname = "Woods"},
                 &nb


Ïà¹ØÎĵµ£º

ÎÞˢи½¼þÉÏ´« £¨asp.net°æ £©

Ò»Ö±ÒÔÀ´¸½¼þÉÏ´«¶¼ÊǸöºÜÓôÃÆµÄÎÊÌ⣬¸Õ¿ªÊ¼ÊÇÀûÓÃjsÌí¼Óinput file È»ºóÒ»ÆðÌá½»À´ÊµÏÖ¶àÎļþÉÏ´«£¬ÔÚʹÓÃ163ÓÊÏäµÄʱºòºÜÊÇÏÛĽËüµÄ¸½¼þÉÏ´«²¿·Ö£¨Ñ¡ÔñÍêÎļþ¾ÍÌá½»£¬¿ÉÒÔ¶à¸öÎļþÒ»ÆðÉÏ´«£¬¶øÇÒ»¹¿ÉÒÔ»ñÈ¡ÉÏ´«½ø¶È£©£¬Õâʱ¾ÍºÜÏë×Ô¼ºÒ²Ð´¸öÄÇÑùµÄ¶«Î÷³öÀ´¡£
×î½ü²ÎÕÕÍøÉϵÄһЩ×ÊÁÏ£¬³õ²½µ½´ïÁËÔ¤ÆÚÄ¿±ê£¨¿Í»§¶Ë»ñÈ¡ÉÏ ......

asp.net(c#) ·µ»ØÉÏÒ»Ò³

Õª³­Ç°±²ÃǵÄ
ÆäʵҪʵÏÖÕâ¸ö¹¦ÄÜÖ÷Òª»¹ÊÇÒªÓõ½javascript
·½·¨Ò»£º
ÔÚasp.netµÄaspxÀïÃæµÄÔ´´úÂëÖÐ
<input type="button onclick="javascript:window.history.go(-1);"value="·µ»ØÉÏÒ»Ò³">
dzÎö£ºÕâ¸öÊÇÓÃÁËHTML¿Ø¼þ£¬Í¨¹ýÒ»¸öonclickµÄʼþ£¬µ÷ÓÃÁËjavascriptÖеÄÒ»¸ö·½·¨¾Í¿ÉÒÔÁË¡£Õâ¸öÊÇ×î¼òµ¥µÄÁË£¬Ò²Í¬Ñù ......

ASP.NETÉÏ´«´óÓÚ4MµÄÎļþµÄÏà¹ØÉèÖÃ

²½Öè1£º
ÐÞ¸Äwin2003ÉÏ´«ÏÞÖÆ£¬ÕÒµ½windows\system32\inserv\metabase.xmlÎļþ
½«ÆäÖеġ¡aspmaxrequestentityallowed= µÄÖµ¸ÄΪ1073741824¡¡£¨1G£©
×¢ÒâÐÞ¸ÄǰҪֹͣIISµÈ·þÎñ¡£
²½Öè2£º
Èç¹ûÄã×°µÄÊÇnet1.1£¬ÇëÕÒµ½windows\...\v1.1.4322\config\machina.configÎļþ£¬½«execution timeout¸ÄΪ36000
½ ......

¡¾×ª¡¿asp.netÌø×ªÒ³ÃæµÄÈýÖÖ·½·¨±È½Ï

1¡¢ response.redirect Õâ¸öÌø×ªÒ³ÃæµÄ·½·¨Ìø×ªµÄËٶȲ»¿ì£¬ÒòΪËüÒª×ß2¸öÀ´»Ø(2´Îpostback)£¬µ«Ëû¿ÉÒÔÌø×ªµ½ÈκÎÒ³Ãæ£¬Ã»ÓÐÕ¾µãÒ³ÃæÏÞÖÆ(¼´¿ÉÒÔÓÉÑÅ»¢Ìøµ½ÐÂÀË)£¬Í¬Ê±²»ÄÜÌø¹ýµÇ¼±£»¤¡£µ«ËÙ¶ÈÂýÊÇÆä×î´óȱÏÝ!redirectÌø×ª»úÖÆ£ºÊ×ÏÈÊÇ·¢ËÍÒ»¸öhttpÇëÇ󵽿ͻ§¶Ë£¬Í¨ÖªÐèÒªÌø×ªµ½ÐÂÒ³Ãæ£¬È»ºó¿Í»§¶ËÔÚ·¢ËÍÌø×ªÇëÇóµ½·þÎñÆ÷¶ ......

asp.netÈ¡Îļþ¼ÐÖÐËùÓÐÎļþÃû

string[] files = Directory.GetDirectories(Server.MapPath("Themes/"));
ÏÈÉùÃ÷ÁËÒ»¸ö×Ö·ûÊý×飬mapPath·½·¨µÃµ½µÄÊÇÒ»¸ö¾ø¶Ô·¾¶¡£
ÒòΪGetFiles·µ»ØµÄÊÇÒ»¸östring[]Êý×飬ËùÒÔÓà filesÀ´½ÓÊÕËü¡£
È»ºóÎÒÃÇÔÚÓÃÒ»¸öforeachÑ­»·À´±éÀúÕâ¸öÊý×飬ȡ³öËùÓÐÖµ¡£
foreach (string file in files)
{
Response.W ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ