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
Ïà¹ØÎĵµ£º
ʵÏÖ URL ÖØÐ´
¿ÉÒÔʹÓà ISAPI ɸѡÆ÷ÔÚ IIS Web ·þÎñÆ÷¼¶±ðʵÏÖ URL ÖØÐ´£¬Ò²¿ÉÒÔʹÓà HTTP Ä£¿é»ò HTTP ´¦Àí³ÌÐòÔÚ ASP.NET ¼¶±ðʵÏÖ URL ÖØÐ´¡£±¾ÎÄÖØµã½éÉÜÈçºÎʹÓà ASP.NET ʵÏÖ URL ÖØÐ´£¬Òò´ËÎÒÃǽ«²»¶ÔʹÓà ISAPI ɸѡÆ÷ʵÏÖ URL ÖØÐ´µÄϸ½Ú½øÐÐÉîÈë̽ÌÖ¡£µ«ÊÇ£¬ÓдóÁ¿µÄµÚÈý·½ ISAPI ɸѡÆ÷¿ÉÓÃÓÚ URL ÖØÐ´£¬ÀýÈ ......
²½Öè1£º
ÐÞ¸Äwin2003ÉÏ´«ÏÞÖÆ£¬ÕÒµ½windows\system32\inserv\metabase.xmlÎļþ
½«ÆäÖеġ¡aspmaxrequestentityallowed= µÄÖµ¸ÄΪ1073741824¡¡£¨1G£©
×¢ÒâÐÞ¸ÄǰҪֹͣIISµÈ·þÎñ¡£
²½Öè2£º
Èç¹ûÄã×°µÄÊÇnet1.1£¬ÇëÕÒµ½windows\...\v1.1.4322\config\machina.configÎļþ£¬½«execution timeout¸ÄΪ36000
½ ......
ÉèÖÃ×é¼þ
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
</configSections>
ÉèÖÃÄ£¿é
<httpModules>
&n ......
½ñÌìÔÚʵÏÖÈçÌâÄÚÈÝʱ£¬Ê¼ÖÕ³öÏÖÁËһЩÎÊÌ⣬ÔÚÂÛ̳ÁôÑÔ£¬»Ø¸´ÕßÉõ¶à£¬µ«Ò²Á¼Ý¬²»Æë£¬ËìÔÚÍ´¿à¼å°¾µÄÕûÀíºó£¬Éú³ö´ËÎÄ
±¾ÎĽöΪһÖÖGridView+CheckBoxʵÏÖȫѡ/·´Ñ¡/ɾ³ýµÄ·½·¨£¬½ö¹©´ó¼Ò²Î¿¼£¬»¶Ó´ó¼ÒÌá³ö×Ô¼º±¦¹óÒâ¼û
demo.aspxÒ³Ãæ
<!-- ÂÔ-->
<asp:GridView id="GvContent" runat="server" &g ......
Ò»¡¢Êý¾Ý¼ÓÃÜ/±àÂëËã·¨Áбí
³£¼ûÓÃÓÚ±£Ö¤°²È«µÄ¼ÓÃÜ»ò±àÂëËã·¨ÈçÏ£º
1¡¢³£ÓÃÃÜÔ¿Ëã·¨
ÃÜÔ¿Ëã·¨ÓÃÀ´¶ÔÃô¸ÐÊý¾Ý¡¢ÕªÒª¡¢Ç©ÃûµÈÐÅÏ¢½øÐмÓÃÜ£¬³£ÓõÄÃÜÔ¿Ëã·¨°üÀ¨£º
DES£¨Data Encryption Standard£©£ºÊý¾Ý¼ÓÃܱê×¼£¬ËٶȽϿ죬ÊÊÓÃÓÚ¼ÓÃÜ´óÁ¿Êý¾ÝµÄ³¡ºÏ£»
3DES£¨Triple DES£©£ºÊÇ»ùÓÚDES£¬¶ÔÒ»¿éÊý¾ÝÓÃÈý¸ö²»Í¬µÄÃÜÔ¿½ ......