<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_Impossible is nothing</title><subtitle type="text">终身快速学习</subtitle><id>http://feed.cnblogs.com/blog/u/41921/rss</id><updated>2011-03-30T00:35:08Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><generator>CNBlogs BlogServer</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/41921/rss"/><entry><id>http://www.cnblogs.com/JoeHou/archive/2011/03/30/1999401.html</id><title type="text">断开/开启网络连接命令</title><summary type="text">断开：ipconfig /release开启：ipconfig /renew</summary><published>2011-03-30T00:35:00Z</published><updated>2011-03-30T00:35:00Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><link rel="alternate" href="http://www.cnblogs.com/JoeHou/archive/2011/03/30/1999401.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/archive/2011/03/30/1999401.html"/><content type="html">&lt;p&gt;断开：ipconfig /release&lt;/p&gt;&#xD;
&lt;p&gt;开启：ipconfig /renew&lt;/p&gt;&lt;img src="http://www.cnblogs.com/JoeHou/aggbug/1999401.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/JoeHou/archive/2011/03/30/1999401.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/JoeHou/archive/2011/02/22/1960314.html</id><title type="text">FW: Dispose and Finalize</title><summary type="text">FW fromhttp://www.dotnetspark.com/kb/2694-non-deterministic-destructors-c-sharp.aspxIntroductionThis article provides an introduction to destructors in C# and reveals the non-deterministic destructor problem.It also analyzes theIDisposable, garbage collection,usingstatement, etc.DestructorThe destru</summary><published>2011-02-21T23:57:00Z</published><updated>2011-02-21T23:57:00Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><link rel="alternate" href="http://www.cnblogs.com/JoeHou/archive/2011/02/22/1960314.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/archive/2011/02/22/1960314.html"/><content type="html">&lt;p&gt;FW from&amp;nbsp;&lt;a href="http://www.dotnetspark.com/kb/2694-non-deterministic-destructors-c-sharp.aspx"&gt;http://www.dotnetspark.com/kb/2694-non-deterministic-destructors-c-sharp.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="color: #4c4c4c; font-family: Verdana; font-size: 13px; line-height: normal; "&gt;&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;This article provides an introduction to destructors in C# and reveals the non-deterministic destructor problem.&lt;/p&gt;&lt;p&gt;It also analyzes the&amp;nbsp;&lt;code&gt;IDisposable&lt;/code&gt;, garbage collection,&amp;nbsp;&lt;code&gt;using&amp;nbsp;&lt;/code&gt;statement, etc.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Destructor&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The destructor is a special purpose method in a class like a constructor. The constructor is called by the runtime after creating an instance. It is meant for initialization purposes. Like that, a destructor is called by the runtime before destroying an instance. It is meant for finalization operations.&lt;/p&gt;&lt;p&gt;A destructor is declared like a constructor with a prefix tilde(~) in C#. A destructor do not have access modifiers like&amp;nbsp;&lt;code&gt;public&lt;/code&gt;,&amp;nbsp;&lt;code&gt;private&lt;/code&gt;, etc.&lt;/p&gt;&lt;p&gt;public&amp;nbsp;class&amp;nbsp;Shape&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~Shape()&amp;nbsp;&lt;em&gt;//&amp;nbsp;Destructor&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;In C#, the .NET runtime automatically destroys any class instances that are no longer in reference. It does this during the process of garbage collection.&lt;/p&gt;&lt;p&gt;Using of destructors will make the application slow in performance.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Finalizers&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;It is important to note that the destructors are&amp;nbsp;&lt;strong&gt;also&lt;/strong&gt;&amp;nbsp;called Finalizers because the compiler converts a C# destructor into a method named&amp;nbsp;&lt;code&gt;Finalize()&amp;nbsp;&lt;/code&gt;in the Intermediate Language (IL). The code in the destructor will be wrapped in a&amp;nbsp;&lt;code&gt;try..finally&amp;nbsp;&lt;/code&gt;block inside the&amp;nbsp;&lt;code&gt;Finalize()&amp;nbsp;&lt;/code&gt;method.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;img src="http://www.dotnetspark.com/kbPicture/jeanpaulva_634213519986050000_destructors.gif"  alt="" /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Garbage Collection&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;This is the process of freeing up of unused memory of objects periodically. The .NET runtime does the process of garbage collection on the following conditions:&lt;/p&gt;&lt;ul&gt;&lt;li style="line-height: 20px; "&gt;When there is shortage of memory&lt;/li&gt;&lt;li style="line-height: 20px; "&gt;Developer invoked the&amp;nbsp;&lt;code&gt;GC.Collect()&lt;/code&gt;&amp;nbsp;method&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The garbage collection helps the developer to free up object instances.&lt;/p&gt;&lt;p&gt;But remember, garbage collection only destroys the managed resources, i.e. resources created inside the managed memory.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What is the Need of Destructors?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Since the runtime is managing the destruction of all objects, a question may arise: Why do we need destructors?&lt;/p&gt;&lt;p&gt;Answer:&amp;nbsp;&lt;strong&gt;To destroy unmanaged resources.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The unmanaged resources are those created outside the managed environment. They may include file handles, network connections, etc. These resources created should be destroyed by the class itself, because the runtime is not able to destroy them.&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.dotnetspark.com/kbPicture/jeanpaulva_634213520316630000_unmanaged.gif"  alt="" /&gt;&lt;/p&gt;&lt;p&gt;Therefore, we use destructors to free up the unmanaged resources. This will ensure that all the unmanaged resources created by the class will be freed in the destructor.&lt;/p&gt;&lt;p&gt;E.g.: Let&amp;nbsp;&lt;code&gt;Channel&amp;nbsp;&lt;/code&gt;be a class using unmanaged resources having a constructor and a destructor.&lt;/p&gt;&lt;div id="premain1"  align-right"="" width="100%" style="display: block; "&gt;public&amp;nbsp;class&amp;nbsp;Channel&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;Channel()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;//&amp;nbsp;Create unmanaged resource&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;&lt;strong&gt;//&amp;nbsp;Lock("c:\\file.log");&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~Channel()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;//&amp;nbsp;Destroy unmanaged resource&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;&lt;strong&gt;//&amp;nbsp;Unlock("c:\\file.log");&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/div&gt;&lt;p&gt;The&amp;nbsp;&lt;code&gt;Channel&amp;nbsp;&lt;/code&gt;class locks a file "&lt;em&gt;c:\file.log&lt;/em&gt;" in the constructor and unlocks it in the destructor.&lt;/p&gt;&lt;p&gt;Here arises a problem that we cannot predict when the destructor is called. So the file remains locked until the garbage collection, even if the object instance is out of any reference.&lt;/p&gt;&lt;p&gt;For the above problem, we need some method to free the unmanaged resource. In .NET, there is an interface named&amp;nbsp;&lt;code&gt;IDisposable&amp;nbsp;&lt;/code&gt;for the purpose.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;IDisposable&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The&amp;nbsp;&lt;code&gt;IDisposable&amp;nbsp;&lt;/code&gt;interface contains a method&amp;nbsp;&lt;code&gt;Dispose()&amp;nbsp;&lt;/code&gt;which should be implemented by the class. So we can move freeing up of unmanaged resources to this&amp;nbsp;&lt;code&gt;Dispose()&amp;nbsp;&lt;/code&gt;method.&lt;/p&gt;&lt;p&gt;Again there is a problem, that a typical .NET developer not calling the&amp;nbsp;&lt;code&gt;Dispose()&amp;nbsp;&lt;/code&gt;method after the usage of class instance. In that case, we need the call to free unmanaged resources both in the destructor and in the&amp;nbsp;&lt;code&gt;Dispose()&amp;nbsp;&lt;/code&gt;method.&lt;/p&gt;&lt;p&gt;We can also use a&amp;nbsp;&lt;code&gt;Close()&amp;nbsp;&lt;/code&gt;method instead of implementing the&amp;nbsp;&lt;code&gt;IDisposable&amp;nbsp;&lt;/code&gt;interface. But, enabling the&amp;nbsp;&lt;code&gt;IDisposable&amp;nbsp;&lt;/code&gt;makes our class usable in the&amp;nbsp;&lt;code&gt;using&amp;nbsp;{}&lt;/code&gt;statement of C#.&lt;/p&gt;&lt;p&gt;The&amp;nbsp;&lt;code&gt;using&amp;nbsp;&lt;/code&gt;statement will automatically call the&amp;nbsp;&lt;code&gt;Dispose()&amp;nbsp;&lt;/code&gt;method after exiting the scope of&amp;nbsp;&lt;code&gt;using&lt;/code&gt;. (Please refer to the&amp;nbsp;sample code.)&lt;/p&gt;&lt;div id="premain2"  align-right"="" width="100%" style="display: block; "&gt;public&amp;nbsp;class&amp;nbsp;Channel : IDisposable&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;Channel()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;//&amp;nbsp;Create unmanaged resource&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lock("c:\\file.log");&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~Channel()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;//&amp;nbsp;Destroy unmanaged resource&lt;/em&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unlock("c:\\file.log");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;void&amp;nbsp;IDisposable.Dispose()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unlock("c:\\file.log");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;void&amp;nbsp;Lock(string&amp;nbsp;file) { }&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public&amp;nbsp;void&amp;nbsp;Unlock(string&amp;nbsp;file) { }&lt;br /&gt;}&lt;/div&gt;&lt;p&gt;At first look, the above code solves all the problems.&lt;/p&gt;&lt;p&gt;But, it creates a new problem due to the non-deterministic destructors of C#.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Non-Deterministic Destructors&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;In C#, we do not know when the destructor is executed. It is called only during the garbage collection process and we do not know when it actually happens. This state is called non-deterministic destructors or InDeterministic destructors.&lt;/p&gt;&lt;p&gt;The following figure illustrates the problem. Our '&lt;code&gt;Channel&lt;/code&gt;' class is using some unmanaged resources and freeing them in the&amp;nbsp;&lt;code&gt;Dispose()&amp;nbsp;&lt;/code&gt;method and also in the destructor.&lt;/p&gt;&lt;p&gt;There are two cases when the&amp;nbsp;&lt;code&gt;Channel&amp;nbsp;&lt;/code&gt;class is used:&lt;/p&gt;&lt;ol&gt;&lt;li style="line-height: 20px; "&gt;A developer creates an instance and exits without calling&amp;nbsp;&lt;code&gt;Dispose()&lt;/code&gt;&lt;/li&gt;&lt;li style="line-height: 20px; "&gt;A developer creates an instance and calls&amp;nbsp;&lt;code&gt;Dispose()&lt;/code&gt;&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;img src="http://www.dotnetspark.com/kbPicture/jeanpaulva_634213520876640000_chart1.gif"  alt="" /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Solution using GC.SuppressFinalize(this)&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;We can instruct the garbage collector not to call the destructor by using the&amp;nbsp;&lt;code&gt;GC.SuppressFinalize(this)&lt;/code&gt;&amp;nbsp;method. So, using&amp;nbsp;&lt;code&gt;this&amp;nbsp;&lt;/code&gt;in the&amp;nbsp;&lt;code&gt;Dispose()&amp;nbsp;&lt;/code&gt;method after freeing up unmanaged resources will solve the non-deterministic destructor problem.&lt;/p&gt;&lt;p&gt;The solution is given below.&lt;/p&gt;&lt;p&gt;Here, the&amp;nbsp;&lt;code&gt;Channel&amp;nbsp;&lt;/code&gt;class has freed up code both in the destructor and in the&amp;nbsp;&lt;code&gt;Dispose()&amp;nbsp;&lt;/code&gt;method. And if the developer calls the&amp;nbsp;&lt;code&gt;Dispose()&amp;nbsp;&lt;/code&gt;method, the unmanaged resources will be freed and the destructor will be disabled by using&amp;nbsp;&lt;code&gt;GC.SuppressFinalize(this);&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;If the developer does not call the&amp;nbsp;&lt;code&gt;Dispose()&lt;/code&gt;&amp;nbsp;method, the unmanaged resources are freed up in the destructor by the garbage collector. The figure below illustrates the solution:&lt;/p&gt;&lt;p&gt;&lt;img src="http://www.dotnetspark.com/kbPicture/jeanpaulva_634213520912640000_chart2.gif"  alt="" /&gt;&lt;/p&gt;&lt;p&gt;Note: The&amp;nbsp;&lt;code&gt;Dispose()&amp;nbsp;&lt;/code&gt;method is used to free up the unmanaged resources, and calling&amp;nbsp;&lt;code&gt;Dispose()&lt;/code&gt;&amp;nbsp;will not free up the instance. It just executes whatever statements are written in it.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Using the Code&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The code along with this article demonstrates the case of using/not using&amp;nbsp;&lt;code&gt;Dispose()&lt;/code&gt;, and also the initiating of the&amp;nbsp;&lt;code&gt;GarbageCollection&amp;nbsp;&lt;/code&gt;process using&lt;code&gt;GC.Collect()&lt;/code&gt;. Please analyze the&amp;nbsp;&lt;code&gt;Channel&amp;nbsp;&lt;/code&gt;class to see the details involved.&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span  style="color: #4c4c4c; font-family: Verdana; font-size: 13px; line-height: normal; "&gt;&amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/JoeHou/aggbug/1960314.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/JoeHou/archive/2011/02/22/1960314.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/JoeHou/archive/2010/11/29/1890910.html</id><title type="text">Assembly generation failed Referenced assembly ‘xxx’ does not have a strong name</title><summary type="text">cancel signing in the property of project</summary><published>2010-11-29T03:45:00Z</published><updated>2010-11-29T03:45:00Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><link rel="alternate" href="http://www.cnblogs.com/JoeHou/archive/2010/11/29/1890910.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/archive/2010/11/29/1890910.html"/><content type="html">cancel signing in the property of project&lt;img src="http://www.cnblogs.com/JoeHou/aggbug/1890910.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/JoeHou/archive/2010/11/29/1890910.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/JoeHou/archive/2010/11/26/1888358.html</id><title type="text">use AjaxControlToolKit Config</title><summary type="text">options:1. .aspx file:&amp;lt;%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %&amp;gt; ...&amp;lt;asp:Accordion&amp;gt;...2.web.config file:... &amp;lt;system.web&amp;gt;　　&amp;lt;compil...</summary><published>2010-11-26T01:21:00Z</published><updated>2010-11-26T01:21:00Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><link rel="alternate" href="http://www.cnblogs.com/JoeHou/archive/2010/11/26/1888358.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/archive/2010/11/26/1888358.html"/><content type="html">&lt;p&gt;options:&lt;/p&gt;&#xD;
&lt;p&gt;1. &lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;&lt;/p&gt;&#xD;
&lt;p&gt;.aspx file:&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;%&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;@&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;Register&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;assembly&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;="AjaxControlToolkit"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;namespace&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;="AjaxControlToolkit"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;tagprefix&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;="asp"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt; %&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt; ...&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;asp&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;Accordion&amp;gt;...&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&lt;p&gt;2.&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;web.config file:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;...&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt; &lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;system.web&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;compilation&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;debug&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;true&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;targetFramework&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;4.0&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;assemblies&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;　　　　　　...　　&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;add&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;assembly&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;AjaxControlToolkit&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt; /&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;　　　　　　...&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&#xD;
&lt;p&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;assemblies&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;compilation&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;　　&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;pages&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;namespaces&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&#xD;
&lt;p&gt;...&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;　　　　&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;namespaces&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;controls&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;add&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;tagPrefix&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;asp&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;namespace&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;AjaxControlToolkit&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;&lt;font color="#ff0000" size="2" face="Consolas"&gt;assembly&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;AjaxControlToolkit&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="Consolas"&gt;&lt;font size="2" face="Consolas"&gt;"&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt; /&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;controls&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;pages&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;&lt;font color="#a31515" size="2" face="Consolas"&gt;system.web&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;...&lt;/p&gt;&#xD;
&lt;p&gt;.aspx file:&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;lt;&lt;font color="#800000" size="2" face="Consolas"&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;asp&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;&lt;font color="#0000ff" size="2" face="Consolas"&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;&lt;font color="#800000" size="2" face="Consolas"&gt;Accordion&amp;gt;...&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://www.cnblogs.com/JoeHou/aggbug/1888358.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/JoeHou/archive/2010/11/26/1888358.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/JoeHou/archive/2010/11/24/1886556.html</id><title type="text">VFS study</title><summary type="text">basic configuration:source control work itemsbuildadvanced:automated testingvirtual lab deploymentarchitectural validationways to access TFSVS (developer)Test &amp;amp; Lab Manager (tester)Web/Excel/Proje...</summary><published>2010-11-24T06:31:00Z</published><updated>2010-11-24T06:31:00Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><link rel="alternate" href="http://www.cnblogs.com/JoeHou/archive/2010/11/24/1886556.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/archive/2010/11/24/1886556.html"/><content type="html">&lt;p&gt;basic configuration:&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;source control &lt;/li&gt;&lt;li&gt;work items&lt;/li&gt;&lt;li&gt;build&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;advanced:&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;automated testing&lt;/li&gt;&lt;li&gt;virtual lab deployment&lt;/li&gt;&lt;li&gt;architectural validation&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;ways to access TFS&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;VS (developer)&lt;/li&gt;&lt;li&gt;Test &amp;amp; Lab Manager (tester)&lt;/li&gt;&lt;li&gt;Web/Excel/Project/MOSS (PM)&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;project templates(&lt;span style="color: red"&gt;need more research on MSDN&lt;/span&gt;):&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;Agile Software Development v5&lt;/li&gt;&lt;li&gt;CMMI Process Improment v5&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://www.cnblogs.com/JoeHou/aggbug/1886556.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/JoeHou/archive/2010/11/24/1886556.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/JoeHou/archive/2010/11/24/1886126.html</id><title type="text">Run MVC in older version of IIS</title><summary type="text">http://www.asp.net/mvc/tutorials/using-asp-net-mvc-with-different-versions-of-iis-csIIS 7(integrated mode): no needIIS 7(classical mode): needIIS 6: needtwo options:1. modify route table to use file e...</summary><published>2010-11-23T23:46:00Z</published><updated>2010-11-23T23:46:00Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><link rel="alternate" href="http://www.cnblogs.com/JoeHou/archive/2010/11/24/1886126.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/archive/2010/11/24/1886126.html"/><content type="html">&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;&lt;font style="background-color: #cce8cf"&gt;&lt;a href="http://www.asp.net/mvc/tutorials/using-asp-net-mvc-with-different-versions-of-iis-cs"&gt;&lt;font style="background-color: #cce8cf"&gt;&lt;font style="background-color: #cce8cf"&gt;http://www.asp.net/mvc/tutorials/using-asp-net-mvc-with-different-versions-of-iis-cs&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;font style="background-color: #cce8cf"&gt;&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;IIS 7(integrated mode): no need&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;IIS 7(classical mode): need&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;IIS 6: need&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;two options:&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;1. modify route table to use file extension if have no right to control web server&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;modify Global.asax&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;2. don't want to modify url appearence and could control the web server&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;&lt;font style="background-color: #cce8cf"&gt;modify Global.asax + set up wildcard script&amp;nbsp;map&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt; &lt;img src="http://www.cnblogs.com/JoeHou/aggbug/1886126.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/JoeHou/archive/2010/11/24/1886126.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/JoeHou/archive/2010/11/23/1885422.html</id><title type="text">MVC study - data validation</title><summary type="text">Data validationSever side:Required &amp;#8211; Indicates that the property is a required field DisplayName &amp;#8211; Defines the text we want used on form fields and validation messages StringLength &amp;#8211;...</summary><published>2010-11-23T06:20:00Z</published><updated>2010-11-23T06:20:00Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><link rel="alternate" href="http://www.cnblogs.com/JoeHou/archive/2010/11/23/1885422.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/archive/2010/11/23/1885422.html"/><content type="html">&lt;ul&gt;&lt;li&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Data validation&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;Sever side:&amp;nbsp;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Required&lt;/strong&gt; &amp;#8211; Indicates that the property is a required field &lt;/li&gt;&lt;li&gt;&lt;strong&gt;DisplayName&lt;/strong&gt; &amp;#8211; Defines the text we want used on form fields and validation messages &lt;/li&gt;&lt;li&gt;&lt;strong&gt;StringLength&lt;/strong&gt; &amp;#8211; Defines a maximum length for a string field &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Range&lt;/strong&gt; &amp;#8211; Gives a maximum and minimum value for a numeric field &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Bind&lt;/strong&gt; &amp;#8211; Lists fields to exclude or include when binding parameter or form values to model properties &lt;/li&gt;&lt;li&gt;&lt;strong&gt;ScaffoldColumn&lt;/strong&gt; &amp;#8211; Allows hiding fields from editor forms &lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;Client side:&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&lt;code &gt;&lt;font color="#800039"&gt;&amp;lt;%@ Import Namespace="MvcMusicStore"%&amp;gt; &lt;/font&gt;&lt;/code&gt;&lt;/div&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&lt;font color="#800039"&gt;&lt;code &gt;&amp;lt;&lt;/code&gt;&lt;code &gt;script&lt;/code&gt;&lt;/font&gt; &lt;font color="#800039"&gt;&lt;code &gt;src&lt;/code&gt;&lt;code &gt;=&lt;/code&gt;&lt;code &gt;"/Scripts/MicrosoftAjax.js"&lt;/code&gt;&lt;/font&gt; &lt;font color="#800039"&gt;&lt;code &gt;type&lt;/code&gt;&lt;code &gt;=&lt;/code&gt;&lt;code &gt;"text/javascript"&lt;/code&gt;&lt;code &gt;&amp;gt;&amp;lt;/&lt;/code&gt;&lt;code &gt;script&lt;/code&gt;&lt;code &gt;&amp;gt; &lt;/code&gt;&lt;/font&gt;&lt;/div&gt;&#xD;
&lt;div &gt;&lt;font color="#800039"&gt;&lt;code &gt;&amp;lt;&lt;/code&gt;&lt;code &gt;script&lt;/code&gt;&lt;/font&gt; &lt;font color="#800039"&gt;&lt;code &gt;src&lt;/code&gt;&lt;code &gt;=&lt;/code&gt;&lt;code &gt;"/Scripts/MicrosoftMvcAjax.js"&lt;/code&gt;&lt;/font&gt; &lt;font color="#800039"&gt;&lt;code &gt;type&lt;/code&gt;&lt;code &gt;=&lt;/code&gt;&lt;code &gt;"text/javascript"&lt;/code&gt;&lt;code &gt;&amp;gt;&amp;lt;/&lt;/code&gt;&lt;code &gt;script&lt;/code&gt;&lt;code &gt;&amp;gt; &lt;/code&gt;&lt;/font&gt;&lt;/div&gt;&#xD;
&lt;div &gt;&lt;font color="#800039"&gt;&lt;code &gt;&amp;lt;&lt;/code&gt;&lt;code &gt;script&lt;/code&gt;&lt;/font&gt; &lt;font color="#800039"&gt;&lt;code &gt;src&lt;/code&gt;&lt;code &gt;=&lt;/code&gt;&lt;code &gt;"/Scripts/MicrosoftMvcValidation.js"&lt;/code&gt;&lt;/font&gt; &lt;font color="#800039"&gt;&lt;code &gt;type&lt;/code&gt;&lt;code &gt;=&lt;/code&gt;&lt;code &gt;"text/javascript"&lt;/code&gt;&lt;code &gt;&amp;gt;&amp;lt;/&lt;/code&gt;&lt;code &gt;script&lt;/code&gt;&lt;code &gt;&amp;gt; &lt;/code&gt;&lt;/font&gt;&lt;/div&gt;&#xD;
&lt;div &gt;&lt;code &gt;&lt;font color="#800039"&gt;&amp;nbsp;&lt;/font&gt;&lt;/code&gt;&amp;nbsp;&lt;/div&gt;&#xD;
&lt;div &gt;&lt;code &gt;&lt;font color="#800039"&gt;&amp;lt;% Html.EnableClientValidation(); %&amp;gt; &lt;/font&gt;&lt;/code&gt;&lt;/div&gt; &lt;img src="http://www.cnblogs.com/JoeHou/aggbug/1885422.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/JoeHou/archive/2010/11/23/1885422.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/JoeHou/archive/2010/11/23/1885303.html</id><title type="text">MVC study</title><summary type="text">default generated foldersFolderPurpose/ControllersControllers respond to input from the browser, decide what to do with it, and return response to the user./ViewsViews hold our UI templates/ModelsMode...</summary><published>2010-11-23T04:38:00Z</published><updated>2010-11-23T04:38:00Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><link rel="alternate" href="http://www.cnblogs.com/JoeHou/archive/2010/11/23/1885303.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/archive/2010/11/23/1885303.html"/><content type="html">&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;&#xD;
&lt;p&gt;&lt;strong&gt;default generated folders&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font style="background-color: #cce8cf"&gt;&#xD;
&lt;p&gt;&lt;table border="0" cellspacing="0" cellpadding="0"&gt;&#xD;
&lt;tbody&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td width="181"&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Folder&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&#xD;
&lt;td width="457"&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td width="181"&gt;&#xD;
&lt;p&gt;&lt;strong&gt;/Controllers&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&#xD;
&lt;td width="457"&gt;&#xD;
&lt;p&gt;Controllers respond to input from the browser, decide what to do with it, and return response to the user.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td width="181"&gt;&#xD;
&lt;p&gt;&lt;strong&gt;/Views&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&#xD;
&lt;td width="457"&gt;&#xD;
&lt;p&gt;Views hold our UI templates&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td width="181"&gt;&#xD;
&lt;p&gt;&lt;strong&gt;/Models&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&#xD;
&lt;td width="457"&gt;&#xD;
&lt;p&gt;Models hold and manipulate data&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td width="181"&gt;&#xD;
&lt;p&gt;&lt;strong&gt;/Content&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&#xD;
&lt;td width="457"&gt;&#xD;
&lt;p&gt;This folder holds our images, CSS, and any other static content&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td width="181"&gt;&#xD;
&lt;p&gt;&lt;strong&gt;/Scripts&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&#xD;
&lt;td width="457"&gt;&#xD;
&lt;p&gt;This folder holds our JavaScript files&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td width="181"&gt;&#xD;
&lt;p&gt;&lt;strong&gt;/App_Data&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&#xD;
&lt;td width="457"&gt;&#xD;
&lt;p&gt;This folder holds our database files &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;/font&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;based on &lt;strong&gt;folder naming convertion&lt;/strong&gt;, for example, controllers look for views in Views folder&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;&lt;strong&gt;advantages&lt;/strong&gt;: reduce typing codes and make it easier to understand&lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font style="background-color: #cce8cf"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;&#xD;
&lt;p&gt;&lt;strong&gt;controllers&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;traditional sites: mapping incoming&amp;nbsp;url/ request&amp;nbsp;to files, e.g. /index.aspx&lt;/p&gt;&#xD;
&lt;p&gt;MVC sites: mapping url to methods of classes, these classes are called &lt;strong&gt;controllers&lt;/strong&gt;, these methods are called &lt;strong&gt;controller actions&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;functions: &lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;processing request&lt;/li&gt;&lt;li&gt;handle input&lt;/li&gt;&lt;li&gt;deal with data&lt;/li&gt;&lt;li&gt;determining response - HTML/redirect/download file...&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;notes:&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;Default home page naming convertion: HomeController&lt;/li&gt;&lt;li&gt;get parametres from methods' params&lt;/li&gt;&lt;li&gt;HttpUtility.HTMLEncode to prevent users from injecting js into our view&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;&#xD;
&lt;p&gt;&lt;strong&gt;ViewModel&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;what viewModel to do: encapsulate the data that controllers want to pass to views&lt;/p&gt;&#xD;
&lt;p&gt;build project before view knows new created viewModel class&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Views&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;what views to do: using template files to more easily customize the HTML contents back to browsers&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;to use view-template, return ActionResult and View();&lt;/p&gt;&#xD;
&lt;p&gt;view's folder location matchs controller's name&lt;/p&gt;&#xD;
&lt;p&gt;view's file name matchs method's name&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;% %&amp;gt; "code nuggets"&lt;/p&gt;&#xD;
&lt;p&gt;&amp;lt;%: %&amp;gt; result will be output to the page instead &amp;lt;%= %&amp;gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Model Class&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;manage data and domain logic, unlike viewModel, which was built just for passing data from controller to view&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;&#xD;
&lt;p&gt;&lt;strong&gt;HTML helper&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;ActionLink&amp;nbsp;create &amp;lt;a&amp;gt; and ensure the URL paths&lt;/p&gt;&#xD;
&lt;p&gt;example:&lt;/p&gt;&#xD;
&lt;p&gt;&lt;table border="0" cellspacing="0" cellpadding="0"&gt;&#xD;
&lt;tbody&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td &gt;&#xD;
&lt;div &gt;&#xD;
&lt;div &gt;&lt;code &gt;&lt;font color="#800039"&gt;&amp;lt;%: Html.ActionLink("Go to the Store Index","Index")%&amp;gt;&lt;/font&gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;two params: link text and same controller's method&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font color="#800039" face="Courier New"&gt;&amp;lt;%: Html.ActionLink(genreName, "Browse", new { genre = genreName })%&amp;gt; &lt;/font&gt;&lt;/p&gt;&#xD;
&lt;p&gt;three&amp;nbsp;params: link text, same controller's method and input&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font color="#800039" face="Courier New"&gt;Html.EditorForModel()&lt;/font&gt;&amp;nbsp; will first look for the template, otherwise use default template&lt;/p&gt;&#xD;
&lt;p&gt;&lt;font color="#800039" face="Courier New"&gt;&amp;lt;%: Html.EditorFor(model =&amp;gt; model.Album,&amp;nbsp; &lt;/font&gt;&lt;/p&gt;&#xD;
&lt;div &gt;&lt;font color="#800039"&gt;&lt;code &gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code &gt;new { Artists = Model.Artists, Genres = Model.Genres}) %&amp;gt;&lt;/code&gt;&lt;/font&gt;&lt;/div&gt;&#xD;
&lt;p&gt;allows us to specify a specific Editor type&amp;nbsp;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;table border="0" cellspacing="0" cellpadding="0"&gt;&#xD;
&lt;tbody&gt;&#xD;
&lt;tr&gt;&#xD;
&lt;td &gt;&#xD;
&lt;div &gt;&#xD;
&lt;div &gt;&lt;code &gt;&lt;font color="#800039"&gt;&amp;lt;%: Html.DropDownList("ArtistId", new SelectList(ViewData["Artists"] as IEnumerable,&amp;nbsp; &lt;/font&gt;&lt;/code&gt;&lt;/div&gt;&#xD;
&lt;div &gt;&lt;font color="#800039"&gt;&lt;code &gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code &gt;"ArtistId", "Name", Model.ArtistId))%&amp;gt;&lt;/code&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;The name of the form field (ArtistId) &lt;/li&gt;&lt;li&gt;The list of values for the dropdown, passed as a SelectList &lt;/li&gt;&lt;li&gt;The Data Value field which should be posted back with the form &lt;/li&gt;&lt;li&gt;The Data Text field which should be displayed in the dropdown list &lt;/li&gt;&lt;li&gt;The Selected Value which is used to set the dropdown list value when the form is displayed &lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Entity Data Model&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;Create EDM via Entity Framework, EF - an ORM(object relational mapping) Data API to query and update data stored in DB&lt;/p&gt;&#xD;
&lt;p&gt;ADO.Net Entity data model represents one Database&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Editor Template&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;Must in folder: /Views/Shared/EditorTemplates &lt;/p&gt;&#xD;
&lt;p&gt;Add view as a partial view(.ascx)&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;ul&gt;&lt;li&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Cascade delete&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&#xD;
&lt;p&gt;delete one record in table a also delete records in table b connected with table a&lt;/p&gt;&#xD;
&lt;p&gt;set "End1 OnDelete"=Cascade in the relation between table a and table b&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt;&#xD;
&lt;p&gt;&lt;/p&gt; &lt;img src="http://www.cnblogs.com/JoeHou/aggbug/1885303.html?type=1" width="1" height="1" alt=""/&gt;&lt;p&gt;&lt;a href="http://www.cnblogs.com/JoeHou/archive/2010/11/23/1885303.html" target="_blank"&gt;本文链接&lt;/a&gt;&lt;/p&gt;</content></entry><entry><id>http://www.cnblogs.com/JoeHou/archive/2009/05/31/1492733.html</id><title type="text">serv-U ftp 550 Permission denied</title><summary type="text">删除用户，重新建就ok了</summary><published>2009-05-31T03:13:00Z</published><updated>2009-05-31T03:13:00Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><link rel="alternate" href="http://www.cnblogs.com/JoeHou/archive/2009/05/31/1492733.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/archive/2009/05/31/1492733.html"/></entry><entry><id>http://www.cnblogs.com/JoeHou/archive/2009/05/12/1454691.html</id><title type="text">安装VS2008提示删除之前的东东-转自Marcel</title><summary type="text">Upgrading Visual Studio Team System Beta to RTM Upgrading Visual studio Team System Beta to RTM uninstall scripts Today I had to upgrade several machines from the Beta or RC version of VSTS to the RTM...</summary><published>2009-05-12T02:41:00Z</published><updated>2009-05-12T02:41:00Z</updated><author><name>Joe Hou</name><uri>http://www.cnblogs.com/JoeHou/</uri></author><link rel="alternate" href="http://www.cnblogs.com/JoeHou/archive/2009/05/12/1454691.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/JoeHou/archive/2009/05/12/1454691.html"/></entry></feed>
