<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5430773937555715880</id><updated>2024-10-25T14:12:19.673+03:00</updated><category term="Build Providers"/><category term="Connection Strings"/><category term="Database"/><category term="Directive"/><category term="Init"/><category term="OutputCache"/><category term="Page Events"/><category term="Pages Directives. Cahce"/><category term="PreInit"/><category term="Prerender"/><category term="SQL"/><category term="UnLoad"/><title type='text'>ASP.NET 4.0 (will be changed soon ...)</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-8826165722386782723</id><published>2011-09-10T17:46:00.000+02:00</published><updated>2011-09-10T17:46:16.839+02:00</updated><title type='text'>What is strong-typing versus weak-typing? Which is preferred? Why? Post title</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fbfbfb; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Strong type is checking the types of variables as soon as possible, usually at compile time. While weak typing is delaying checking the types of the system as late as possible, usually to run-time. Which is preferred depends on what you want. For scripts &amp;amp; quick stuff you’ll usually want weak typing, because you want to write as much less code as possible. In big programs, strong typing can reduce errors at compile time.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fbfbfb; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fbfbfb; font-size: 15px; line-height: 21px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #4b4d4f; font-size: 12px; line-height: 15px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In strongly-typed programming languages you usually have to declare variables prior to using them.&amp;nbsp;&lt;span class=&quot;searchword&quot; style=&quot;background-color: yellow; font-size: 1.33em; line-height: 1.25em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Strong-typing&lt;/span&gt;&amp;nbsp;is the strict enforcement of [type] rules. All types (int, short, long, string) are know at compile time and are statically bound. So C# is a strongly-typed language because variables must be assigned a type before you use them. If you came from the ASP world then you will remember having to use either Javascript or VBScript. Variables that you declare in either of those languages can hold any data type which makes it weakly-typed.&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
But lets take this up a level. Instead to talking about programming languages, lets talk about strongly-typed/weakly-typed objects. The DataSet object is a great example. If we use a weakly-typed dataset, the developer needs to know the name of the table and the name of the field being requested. Since we are just passing strings, this code will compile and will not show any possible problems (like typing the name of the table wrong) until run time.&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: 1.33em; line-height: 1.25em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 1.33em; line-height: 1.25em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;string&lt;/span&gt;&amp;nbsp;s = (&lt;span style=&quot;color: blue; font-size: 1.33em; line-height: 1.25em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;string&lt;/span&gt;) myDataSet.Tables[&lt;span style=&quot;color: maroon; font-size: 1.33em; line-height: 1.25em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Customers&quot;&lt;/span&gt;].Rows[0][&lt;span style=&quot;color: maroon; font-size: 1.33em; line-height: 1.25em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;CustomerID&quot;&lt;/span&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
If our Dataset is Strongly-Typed, we are able to access the names of the tables and columns directly. Any errors are caught at compile time.&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: black; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-size: 1.33em; line-height: 1.25em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 1.33em; line-height: 1.25em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;string&lt;/span&gt;&amp;nbsp;s = myDataSet.Customers[0].CustomerID;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
I am not really going to argue which is better, I will leave that up to you. I will leave you with this question though; would you rather catch your errors at compile time, or run-time?&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/8826165722386782723/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2011/09/what-is-strong-typing-versus-weak.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/8826165722386782723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/8826165722386782723'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2011/09/what-is-strong-typing-versus-weak.html' title='What is strong-typing versus weak-typing? Which is preferred? Why? Post title'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-2536867263116697079</id><published>2011-09-10T15:47:00.001+02:00</published><updated>2011-09-10T15:47:25.852+02:00</updated><title type='text'>Implementing the Basic Patterns in ASP.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #2e2e2e; font-family: Arial; font-size: 12px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The previous sections briefly describe five common and simple types of design pattern. These are all applicable to&amp;nbsp;ASP.NET, and reasonably easy to implement. In fact, ASP.NET and the&amp;nbsp;.NET&amp;nbsp;Framework automatically implement several of them. Figure 5 shows schematically how these patterns relate to ASP.NET applications; you will see descriptions of their implementation or use in the subsequent sections of this article.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;Figure 5 - How ASP.NET implements some basic design patterns&quot; src=&quot;http://www.developerfusion.com/res/content/8307/figure5/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Figure 5 - How ASP.NET implements some basic&amp;nbsp;&lt;a class=&quot;entity-ref&quot; href=&quot;http://www.developerfusion.com/t/patterns/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;design patterns&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Implementation of the Model-View-Presenter Pattern&lt;/h2&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #2e2e2e; font-family: Arial; font-size: 12px;&quot;&gt;For example, a page might use a separate class that exposes methods to read and update a database table. This class can use the SqlClient, OleDb, or another data provider to connect to the database, and execute SELECT and UPDATE queries or stored procedures. The code in the code-behind file uses this class to retrieve the data, and populates the controls defined in the ASPX file that generates the user interface. When the user interacts with controls in the page, perhaps changing values in the data, code in the code-behind file executes during the postback and uses the data access class to push the changes back into the database.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #2e2e2e; font-family: Arial; font-size: 12px;&quot;&gt;&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The ASP.NET code-behind technology, which uses partial classes, provides a natural implementation of the MVP pattern. The code-behind file (the Presenter) contains all the logic and processing code, and populates the page (the View). Event handlers within the code-behind file handle events raised by controls, or by the page itself, to perform actions when a postback to the server occurs. To complete this pattern, the code-behind file can use a separate data access layer or component (the Model) to read from, write to, and expose the source data - usually accessed through built-in providers that are part of the .NET Framework.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The sample application uses the code-behind model throughout, thereby implementing the MVP pattern on each page. The default page (Default.aspx) demonstrates the ASP.NET application of the MVP pattern by displaying a View that contains a series of controls that allow users to execute any of a range of functions that fetch and display data (see Figure 6).&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Figure 6 - Finding a customer name in the Default page of the sample application&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Clicking one of the buttons causes a postback to the server and raises the event that corresponds to that button. For example, the interface component for the second button shown in Figure 6 is an ASP.NET Button control, declared within the View (the ASPX page), which initiates an event handler named btnCustModelClick in the Presenter (the code-behind file) to handle the Click event:&lt;/div&gt;
&lt;pre style=&quot;background-color: #fff8e1; clear: both; display: block; font-family: &#39;Lucida Console&#39;, monospace; font-size: 11px; margin-bottom: 10px; max-width: 620px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;code style=&quot;font-size: 11px; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;asp:Button ID=&quot;btn_CustModel&quot; runat=&quot;server&quot; Text=&quot;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&quot;
            OnClick=&quot;btn_CustModel_Click&quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Get name for customer&lt;/div&gt;
&lt;pre style=&quot;background-color: #fff8e1; clear: both; display: block; font-family: &#39;Lucida Console&#39;, monospace; font-size: 11px; margin-bottom: 10px; max-width: 620px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;code style=&quot;font-size: 11px; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;asp:Button ID=&quot;btn_CustModel&quot; runat=&quot;server&quot; Text=&quot;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&quot;
            OnClick=&quot;btn_CustModel_Click&quot; /&amp;gt;
Get name for customer
&amp;lt;asp:TextBox ID=&quot;txtID_CustModel&quot; runat=&quot;server&quot; Text=&quot;ALFKI&quot; Columns=&quot;3&quot; /&amp;gt; 
from CustomerModel
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In the Presenter (the code-behind file) is the declaration of the btnCustModelClick method, which creates an instance of the Model (a class named CustomerModel.cs in the App_Code folder) and calls one of its methods to get the name of the customer identified by the customer ID in the text box next to that button:&lt;/div&gt;
&lt;pre style=&quot;background-color: #fff8e1; clear: both; display: block; font-family: &#39;Lucida Console&#39;, monospace; font-size: 11px; margin-bottom: 10px; max-width: 620px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;code style=&quot;font-size: 11px; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;protected void btn_CustModel_Click(object sender, EventArgs e)
// display the name of the specified customer
{
  try
  {
    // use method of the CustomerModel class
    CustomerModel customers = new CustomerModel();
    Label1.Text += &quot;Customer Name from CustomerModel class: &quot;;
    Label1.Text += customers.GetCustomerName(txtID_CustModel.Text);
  }
  catch (Exception ex)
  {
    Label1.Text += &quot;PAGE ERROR: &quot; + ex.Message;
  }
  Label1.Text += &quot;&amp;lt;p /&amp;gt;&quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
You can view the contents of the files Default.aspx (the View), Default.aspx.cs (the Presenter), and CustomerModel.cs (the Model) that implement the MVP pattern in this example to see all of the UI control declarations and code they contain. As you saw in Figure 6, there are buttons to execute a range of methods of the CustomerModel class, as well as methods of the Repository, Web Reference, and Service Agent implementations discussed in the following sections.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Notice that the Default.aspx page (in Figure 6) contains a drop-down list where you can select a page or view you want to see, loaded using an implementation of the Front Controller pattern. You will see details of this in the section &quot;Implementation of the Front Controller Pattern&quot; later in the next article. You can use this drop-down list to navigate to other pages to see the examples, for example the Use Case Controller example page or the Publish-Subscribe example page.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Implementation of the Provider Pattern&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
ASP.NET uses the Provider pattern in a number of places. These include providers for the Membership and Role Management system (such as the SqlMembershipProvider and SqlRoleProvider), the Site Navigation system (the XmlSiteMapProvider), and the user profile management system (such as the SqlProfileProvider). The data access components in ASP.NET, such as SqlDataSource, also rely on providers. These providers are part of the .NET Framework data-access namespaces, including SqlClient, OleDb, Odbc, and OracleClient. Each provider is configured in the Web.config file, with the default settings configured in the server&#39;s root Web.config file. Developers can create their own providers based on an interface that defines the requirements, or by inheriting from a base class containing common functionality for that type of provider. For example, developers can extend the DataSourceControl class to create their own data source controls that interface with a non-supported or custom data store.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Implementation of the Adapter Pattern&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
ASP.NET uses adapters to generate the output from server controls. By default, server controls use adapters such as the WebControlAdapter or DataBoundControlAdapter to generate the markup (such as&amp;nbsp;&lt;a class=&quot;entity-ref&quot; href=&quot;http://www.developerfusion.com/t/html/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;HTML&lt;/a&gt;) and other content output by the control. Each adapter provides methods such as Render and CreateChildControls that the server controls call to create the appropriate output. Alternative adapters are available, for example the&amp;nbsp;&lt;a href=&quot;http://www.asp.net/cssadapters/&quot; rel=&quot;nofollow&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;CSS Friendly Control Adapters&lt;/a&gt;&amp;nbsp;that provide more flexibility for customizing the rendered HTML. Developers can also create their own adapters to provide custom output from the built-in controls, and from their own custom controls.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Implementation of the Service Agent and Proxy Patterns&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The Proxy and Broker patterns provide a natural technique for connecting to and using remote services without forcing the use of O/S or application-specific protocols such as DCOM. In particular, they are ideal for use with&amp;nbsp;&lt;a class=&quot;entity-ref&quot; href=&quot;http://www.developerfusion.com/t/web-services/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Web Services&lt;/a&gt;. In&amp;nbsp;&lt;a class=&quot;entity-ref&quot; href=&quot;http://www.developerfusion.com/t/visual-studio/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Visual Studio&lt;/a&gt;, developers add a Web Reference to a project, which automatically collects the web service description (including a WSDL contract file). This lets the code generate a suitable proxy class that exposes the methods of the remote service to code in the application.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Code in the application can then use the remote service by creating an instance of the proxy class and calling the exposed methods defined in the contract. This is the code used in the sample application to call the CustomerName method of the DemoService service:&lt;/div&gt;
&lt;pre style=&quot;background-color: #fff8e1; clear: both; display: block; font-family: &#39;Lucida Console&#39;, monospace; font-size: 11px; margin-bottom: 10px; max-width: 620px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;code style=&quot;font-size: 11px; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;protected void btn_WSProxy_Click(object sender, EventArgs e)
// display name of specified customer using the Web Service 
{
  try
  {
    // get details from Web Service
    // use &#39;using&#39; construct to ensure disposal after use
    using (LocalDemoService.Service svc = new LocalDemoService.Service())
    {
      Label1.Text += &quot;Customer name from Web Service: &quot; 
                  + svc.CustomerName(txtID_WSProxy.Text);
    }
  }
  catch (Exception ex)
  {
    Label1.Text += &quot;PAGE ERROR: &quot; + ex.Message;
  }
  Label1.Text += &quot;&amp;lt;p /&amp;gt;&quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
One issue with using a Web Service is the difficulty in raising exceptions that the client can handle. The usual approach is to return a specific value that indicates the occurrence of an exception or failure. Therefore, one useful feature that a Service Agent, which wraps the Web Reference to add extra functionality, can offer is detecting exceptions by examining the returned value and raising a local exception to the calling code.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The following code, from the ServiceAgent.cs class in the sample application, contains a constructor that instantiates the local proxy for the service and stores a reference to it. Then the GetCustomerName method can call the CustomerName method of the Web Service and examine the returned value. If it starts with the text &quot;ERROR:&quot; the code raises an exception that the calling routine can handle.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The GetCustomerName method also performs additional processing on the value submitted to it. The Web Service only matches on a complete customer ID (five characters in the example), and does not automatically support partial matches. The GetCustomerName method in the Service Agent checks for partial customer ID values and adds the wildcard character so that the service will return a match on this partial value:&lt;/div&gt;
&lt;pre style=&quot;background-color: #fff8e1; clear: both; display: block; font-family: &#39;Lucida Console&#39;, monospace; font-size: 11px; margin-bottom: 10px; max-width: 620px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;code style=&quot;font-size: 11px; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// wraps the Web Reference and calls to Web Service
// to perform auxiliary processing
public class ServiceAgent
{
  LocalDemoService.Service svc = null;

  public ServiceAgent()
  {
    // create instance of remote Web service
    try
    {
      svc = new LocalDemoService.Service();
    }
    catch (Exception ex)
    {
      throw new Exception(&quot;Cannot create instance of remote service&quot;, ex); 
    }
  }

  public String GetCustomerName(String custID)
  {
    // add &#39;*&#39; to customer ID if required
    if (custID.Length &amp;lt; 5)
    {
      custID = String.Concat(custID, &quot;*&quot;);
    }
    // call Web Service and raise a local exception
    // if an error occurs (i.e. when the returned
    // value string starts with &quot;ERROR:&quot;)
    String custName = svc.CustomerName(custID);
    if (custName.Substring(0,6) == &quot;ERROR:&quot;)
    {
      throw new Exception(&quot;Cannot retrieve customer name - &quot; + custName);       
    }
    return custName;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
To use this simple example of a Service Agent, code in the Default.aspx page of the sample application instantiates the Service Agent class and calls the GetCustomerName method. It also traps any exception that the Service Agent might generate, displaying the message from the InnerException generated by the agent.&lt;/div&gt;
&lt;pre style=&quot;background-color: #fff8e1; clear: both; display: block; font-family: &#39;Lucida Console&#39;, monospace; font-size: 11px; margin-bottom: 10px; max-width: 620px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;code style=&quot;font-size: 11px; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;protected void btn_WSAgent_Click(object sender, EventArgs e)
// display name of specified customer using the Service Agent
// extra processing in Agent allows for match on partial ID
{
  try
  {
    // get details from Service Agent
    ServiceAgent agent = new ServiceAgent();
    Label1.Text += &quot;Customer name from Service Agent: &quot; 
                + agent.GetCustomerName(txtID_WSAgent.Text);
  }
  catch (Exception ex)
  {
    Label1.Text += &quot;PAGE ERROR: &quot; + ex.Message + &quot;&amp;lt;br /&amp;gt;&quot;;
    if (ex.InnerException != null)
    {
      Label1.Text += &quot;INNER EXCEPTION: &quot; + ex.InnerException.Message;
    }
  }
  Label1.Text += &quot;&amp;lt;p /&amp;gt;&quot;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Implementation of the Repository Pattern&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
A data repository that implements the Repository pattern can provide dependency-free access to data of any type. For example, developers might create a class that reads user information from Active Directory, and exposes it as a series of User objects - each having properties such as Alias, EmailAddress, and PhoneNumber. The repository may also provide features to iterate over the contents, find individual users, and manipulate the contents.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Third-party tools are available to help developers build repositories, such as the CodeSmith tools library (see&lt;a href=&quot;http://www.codesmithtools.com/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;http://www.codesmithtools.com/&lt;/a&gt;). Visual Studio includes the tools to generate a typed DataSet that can expose values as properties, rather than as data rows, and this can form the basis for building a repository.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
As a simple example, the sample application uses a typed DataSet (CustomerRepository.xsd in the App_Code folder), which is populated from the Customers table in the Northwind database. The DataSet Designer in Visual Studio automatically implements the Fill and GetData methods within the class, and exposes objects for each customer (CustomersRow) and for the whole set of customers (CustomersDataTable).&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The class CustomerRepositoryModel.cs in the App_Code folder exposes data from the typed DataSet, such as the GetCustomerList method that returns a populated CustomersDataTable instance, and the GetCustomerName method that takes a customer ID and returns that customer&#39;s name as a String:&lt;/div&gt;
&lt;pre style=&quot;background-color: #fff8e1; clear: both; display: block; font-family: &#39;Lucida Console&#39;, monospace; font-size: 11px; margin-bottom: 10px; max-width: 620px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;code style=&quot;font-size: 11px; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public class CustomerRepositoryModel
{

  public CustomerRepository.CustomersDataTable GetCustomerList()
  {
    // get details from CustomerRepository typed DataSet
    try
    {
      CustomersTableAdapter adapter = new CustomersTableAdapter();
      return adapter.GetData();
    }
    catch (Exception ex)
    {
      throw new Exception(&quot;ERROR: Cannot access typed DataSet&quot;, ex);
    }
  }

  public String GetCustomerName(String custID)
  {
    // get details from CustomerRepository typed DataSet
    try
    {
      if (custID.Length &amp;lt; 5)
      {
        custID = String.Concat(custID, &quot;*&quot;);
      }
      CustomerRepository.CustomersDataTable customers = GetCustomerList();
      // select row(s) for this customer ID
      CustomerRepository.CustomersRow[] rows 
        = (CustomerRepository.CustomersRow[])customers.Select(
                                &quot;CustomerID LIKE &#39;&quot; + custID + &quot;&#39;&quot;);
      // return the value of the CompanyName property
      return rows[0].CompanyName;
    }
    catch (Exception ex)
    {
      throw new Exception(&quot;ERROR: Cannot access typed DataSet&quot;, ex);
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;
Implementation of the Singleton Pattern&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The sample application uses the Front Controller pattern to allow users to specify the required View using a short and memorable name. The Front Controller, described in detail in a later section, relies on an&amp;nbsp;&lt;a class=&quot;entity-ref&quot; href=&quot;http://www.developerfusion.com/t/xml/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;XML&lt;/a&gt;&amp;nbsp;file that contains the mappings between the memorable name and the actual URL for this view. To expose this XML document content to the Front Controller code, the application uses a Singleton instance of the class named TransferUrlList.cs (in the App_Code folder).&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
This approach provides good performance, because the class is loaded at all times and the Front Controller just has to call a static method to get a reference to the single instance, and call the method that translates the memorable name into a URL.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
To implement the Singleton pattern, the class contains a private default constructor (a constructor that takes no parameters), which prevents the compiler from adding a default public constructor. This also prevents any classes or code from calling the constructor to create an instance.&lt;/div&gt;
&lt;blockquote style=&quot;font-style: italic; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Note that this implementation does not perform locking while it creates the instance. In reality, in this specific scenario, if a second thread should create a second instance it will not affect operation because the content is read-only and is the same for all instances. If you absolutely need to confirm that only one instance can ever exist, you should apply locks while checking for and creating the instance. For more details, see&amp;nbsp;&lt;a href=&quot;http://www.developerfusion.com/article/9407/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Implementing the Singleton Pattern in C#&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://www.dofactory.com/Patterns/PatternSingleton.aspx&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Data &amp;amp; Object Factory Singleton Pattern&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The TransferUrlList class also contains a static method that returns the single instance, creating and populating it from the XML file if there is no current instance. The class uses static local variables to store a reference to the instance, and - in this example - to hold a StringDictionary containing the list of URLs loaded from the XML file:&lt;/div&gt;
&lt;pre style=&quot;background-color: #fff8e1; clear: both; display: block; font-family: &#39;Lucida Console&#39;, monospace; font-size: 11px; margin-bottom: 10px; max-width: 620px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;code style=&quot;font-size: 11px; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;// Singleton class to expose a list of URLs for
// Front Controller to use to transfer to when 
// special strings occur in requested URL
public class TransferUrlList
{
  private static TransferUrlList instance = null;
  private static StringDictionary urls;

  private TransferUrlList()
  // prevent code using the default constructor by making it private
  { }

  public static TransferUrlList GetInstance()
  // public static method to return single instance of class
  {
    // see if instance already created
    if (instance == null)
    {
      // create the instance
      instance = new TransferUrlList();
      urls = new StringDictionary();
      String xmlFilePath = HttpContext.Current.Request.MapPath(
                                        @&quot;~/xmldata/TransferURLs.xml&quot;);
      // read list of transfer URLs from XML file
      try
      {
        using (XmlReader reader = XmlReader.Create(xmlFilePath))
        {
          while (reader.Read())
          {
            if (reader.LocalName == &quot;item&quot;)
            {
              // populate StringDictionary
              urls.Add(reader.GetAttribute(&quot;name&quot;), reader.GetAttribute(&quot;url&quot;));
            }
          }
        }
      }
      catch (Exception ex)
      {
        throw new Exception(&quot;Cannot load URL transfer list&quot;, ex);
      }
    }
    return instance;
  }
  ...
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
A StringDictionary provides good performance, as the method that searches for a matching name and URL in the list can use the ContainsKey method, and then access the matching value using an indexer. If there is no match, the code returns the original value without translating it. This listing shows the GetTransferUrl method that performs the URL translation:&lt;/div&gt;
&lt;pre style=&quot;background-color: #fff8e1; clear: both; display: block; font-family: &#39;Lucida Console&#39;, monospace; font-size: 11px; margin-bottom: 10px; max-width: 620px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;code style=&quot;font-size: 11px; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;public String GetTransferUrl(String urlPathName)
// public method to return URL for a specified name
// returns original URL if not found
{
  if (urls.ContainsKey(urlPathName))
  {
    return urls[urlPathName];
  }
  else
  {
    return urlPathName;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
To use the TransferUrlList Singleton class, code in the Front Controller just has to get a reference to the instance, and then call the GetTransferUrl method with the URL to translate as the value of the single parameter:&lt;/div&gt;
&lt;pre style=&quot;background-color: #fff8e1; clear: both; display: block; font-family: &#39;Lucida Console&#39;, monospace; font-size: 11px; margin-bottom: 10px; max-width: 620px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;&lt;code style=&quot;font-size: 11px; font-style: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;...
// get Singleton list of transfer URLs 
TransferUrlList urlList = TransferUrlList.GetInstance();
// see if target value matches a transfer URL
// by querying the list of transfer URLs
// method returns the original value if no match 
String transferTo = urlList.GetTransferUrl(reqTarget);
...&lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/2536867263116697079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2011/09/implementing-basic-patterns-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/2536867263116697079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/2536867263116697079'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2011/09/implementing-basic-patterns-in-aspnet.html' title='Implementing the Basic Patterns in ASP.NET'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-848434494318073852</id><published>2011-09-10T15:45:00.001+02:00</published><updated>2011-09-10T15:45:38.978+02:00</updated><title type='text'>ASP.NET Patterns every developer should know</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #2e2e2e; font-family: Arial; font-size: 12px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 class=&quot;page-title&quot; style=&quot;border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; clear: left; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;

Introduction&lt;/h2&gt;
&lt;div class=&quot;content&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div id=&quot;article-body&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
For the past year or so, I&#39;ve been involved in documentation of frameworks that help developers to write better code, and to create applications that are more efficient and easier to test, debug, maintain, and extend. During that time, it has been interesting to see the continuing development of best practice techniques and tools at one of the leading software companies in our industry. Most of the work was outside my usual sphere of&amp;nbsp;ASP.NET&amp;nbsp;and Web development, concentrating mainly on Windows Forms applications built using&amp;nbsp;.NET&amp;nbsp;2.0. This is an area where the standard&amp;nbsp;design patterns&amp;nbsp;that have evolved over many years are increasingly being refined and put into practice.&lt;/div&gt;
However, I regularly found myself wondering just how many of these patterns are equally applicable and advantageous within ASP.NET applications, where we now have the ability to write &quot;real code&quot; in .NET languages such as&amp;nbsp;Visual Basic .NET&amp;nbsp;and&amp;nbsp;&lt;a class=&quot;entity-ref&quot; href=&quot;http://www.developerfusion.com/t/csharp/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;C#&lt;/a&gt;&amp;nbsp;- rather than the awkward mix of script and COM components upon which classic&amp;nbsp;ASP&amp;nbsp;depended. Surely, out of the 250+ patterns listed on sites such as the&amp;nbsp;&lt;a href=&quot;http://www.patternshare.org/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;PatternShare Community&lt;/a&gt;, some must be useful in ASP.NET applications. Yet a search of the Web revealed that - while there is plenty of material out there on design patterns in general, and their use in executable and Windows Forms applications - there is little that concentrates directly on the use of standard design patterns within ASP.NET.&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
One very useful document that is available is &quot;&lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?familyid=3C81C38E-ABFC-484F-A076-CF99B3485754&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Enterprise Solution Patterns Using Microsoft .NET&lt;/a&gt;&quot;. This discusses what design patterns are, how they are documented, and their usage in .NET Enterprise applications. It does not aim solely at ASP.NET, but has plenty of ASP.NET coverage.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;

About Design Patterns&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Because there is so much general material available on the aims and the documentation of design patterns for executable applications, I will restrict this discussion to a few basic points before moving on to look at the patterns I find most useful in ASP.NET. The References section at the end of Part 3 of this series of articles contains links to many useful resources and Web sites related to design patterns in general.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
While many people (myself included) find the term &quot;design patterns&quot; just a little scary - due not least to the way that they are usually described and documented - most developers use informal patterns every day when writing code. Constructs such as try...catch, using, and switch (Select Case) statements all follow standard patterns that developers have learned over time. In fact, patterns can be:&lt;/div&gt;
&lt;ul style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Informal Design Patterns - such as the use of standard code constructs, best practice, well structured code, common sense, the accepted approach, and evolution over time&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Formal Design Patterns - documented with sections such as &quot;Context&quot;, &quot;Problem&quot;, &quot;Solution&quot;, and a UML diagram&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Formal patterns usually have specific aims and solve specific issues, whereas informal patterns tend to provide guidance that is more general. Formal patterns usually have specific aims and solve specific issues, whereas informal patterns tend to provide guidance that is more general. Brad Appleton, author of the book &quot;&lt;a href=&quot;http://www.scmpatterns.com/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Software Configuration Management Patterns: Effective Teamwork, Practical Integration&lt;/a&gt;&quot;, describes design patterns, pattern languages, and the need for them in software engineering and development, like this:&lt;/div&gt;
&lt;blockquote style=&quot;font-style: italic; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&quot;Fundamental to any science or engineering discipline is a common vocabulary for expressing its concepts, and a language for relating them together.&quot;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&quot;... a body of literature to help software developers resolve recurring problems encountered throughout all of software development.&quot;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&quot;... a shared language for communicating insight and experience about these problems and their solutions.&quot;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&quot;A pattern is a named nugget of insight that conveys the essence of a proven solution to a recurring problem within a certain context amidst competing concerns.&quot;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
(from &quot;&lt;a href=&quot;http://www.cmcrossroads.com/bradapp/docs/patterns-intro.html#Intro&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Patterns and Software: Essential Concepts and Terminology&lt;/a&gt;&quot;)&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The following sections of this article and the following two articles aim to demonstrate how you can use some of the common formal patterns (some with minor adaptations to suit ASP.NET requirements) in your Web applications to achieve the aims set out so succinctly by the Hillside Group. You can&amp;nbsp;download the reasonably simple example application&amp;nbsp;and open it in&amp;nbsp;Visual Studio&amp;nbsp;2005, or install it to run under Internet Information Services (IIS). The download file includes a ~readme.txt file that describes the setup requirements.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;

Basic Design Patterns and Groups&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Design patterns fall into groups, based on the type and aims of the pattern. For example, some patterns provide presentation logic for displaying specific views that make up the user interface. Others control the way that the application behaves as the user interacts with it. There are also groups of patterns that specify techniques for persisting data, define best practices for data access, and indicate optimum approaches for creating instances of objects that the application uses. The following list shows some of the most common design patterns within these groups:&lt;/div&gt;
&lt;ul style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Presentation Logic&lt;ul style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Model-View-Controller (MVC)&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Model-View-Presenter (MVP)&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Use Case Controller&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Host or Behavioral&lt;ul style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Command&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Publish-Subscribe / Observer&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Plug-in / Module / Intercepting Filter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Structural&lt;ul style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Service Agent / Proxy / Broker&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Provider / Adapter&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Creational&lt;ul style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Factory / Builder / Injection&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Singleton&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Persistence&lt;ul style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Repository&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The remaining sections of this and the two following articles discuss the patterns that are most suitable for use in ASP.NET, or which ASP.NET implements automatically and allows you to extend to adapt the behavior to suit your own requirements. See the index at the start of each article for a list of the patterns described.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;

The Model-View-Controller and Model-View-Presenter Patterns&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The Model-View-Controller (MVC) and Model-View-Presenter (MVP) Patterns improve reusability of business logic by separating the three components required to generate and manage a specific user interface (such as a single Web page). The Model contains the data that the View (the Web page) will display and allow the user to manipulate. The Controller or Presenter links the Model and the View, and manages all interaction and processing of the data in the Model (see Figure 1).&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;Figure 1 - the MVC and MVP Patterns&quot; src=&quot;http://www.developerfusion.com/res/content/8307/figure1/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Figure 1 - The Model-View-Controller and Model-View-Presenter Patterns&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In the MVC pattern, user interaction with the View raises events in the Controller, which updates the Model. The Model then raises events to update the View. However, this introduces a dependency between the Model and the View. To avoid this, the MVP pattern uses a Presenter that both updates the Model and receives update events from it, using these updates to update the View. The MVP pattern improves testability, as all the logic and processing occurs within the Presenter, but it does add some complexity to the implementation because updates must pass from the Presenter to the View.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;

The Provider and Adapter Patterns&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The Provider and Adapter patterns allows otherwise incompatible classes to work together by converting the interface of one class into an interface expected by the other. In more practical terms, these patterns provide separation between components that allows behavioral changes to occur without prior knowledge of requirements. The application and any data sources it uses, outputs it generates, or classes it must interact with, can be created independently yet still work together (see Figure 2).&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;Figure 2 - The Provider and Adapter Patterns&quot; src=&quot;http://www.developerfusion.com/res/content/8307/figure2/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Figure 2 - The Provider and Adapter Patterns&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The Provider pattern separates the data processing objects, and the application, from the source data. It allows the code in the application to be independent of the type of data source and the format of the data. A Provider component or service exposes standard methods that the application can call to read and write data. Internally, it converts these calls to the equivalents that match the data source. This means that the application can work with any source data type (such as any kind of database,&amp;nbsp;&lt;a class=&quot;entity-ref&quot; href=&quot;http://www.developerfusion.com/t/xml/&quot; style=&quot;color: #4d97e0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;XML&lt;/a&gt;&amp;nbsp;document, disk file, or data repository) for which a suitable provider is available.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The Adapter pattern has the same advantages, and works in a similar way. Often, the target of an Adapter is some kind of output. For example, a printer driver is an example of an Adapter. ASP.NET itself, and other frameworks such as Enterprise Library, make widespread use of the Provider and Adapter patterns.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;

The Service Agent, Proxy, and Broker Patterns&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Various patterns exist that remove dependencies between a client and a service by using intermediate brokers. There are many different implementations of the basic pattern, some of which use an extra service-agent logic component to connect the client with the local proxy or gateway interface (see Figure 3).&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;Figure 3 - The Service Agent, Proxy, and Broker Patterns&quot; src=&quot;http://www.developerfusion.com/res/content/8307/figure3/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Figure 3 - The Service Agent, Proxy, and Broker Patterns&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The aim of all these patterns is to allow remote connection to, and use of, a service without the client having to know how the service works. The service exposes a Contract that defines its interface, such as the Web Service Description Language (WSDL) document for a Web Service. A client-side proxy or gateway interface uses the Contract to create a suitably formatted request, and passes this to the service interface. The service sends the formatted response back through its gateway interface to the client proxy, which exposes it to the client. In effect, the client just calls the service methods on the client proxy, which returns the results just as if the service itself was a local component.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In the Service Agent pattern, an extra component on the client can perform additional processing and logic operations to further separate the client from the remote service. For example, the Service Agent may perform service address lookup, manipulate or format the client data to match the proxy requirements, or carry out any other kind of processing requirements common to different clients that use the service.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;

The Repository Pattern&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The Repository pattern virtualizes storage of entities in a persistent medium, such as a database or as XML. For example, a repository may expose data held in the tables of a database as strongly typed Customer and Order objects rather than data sets or data rows. It effectively hides the storage implementation from the application code, and allows the use of a common set of methods in the application without requiring knowledge of the storage mechanism or format. Often, the repository uses a series of providers to connect to the source data (see Figure 4).&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;Figure 4 - The Repository Pattern&quot; src=&quot;http://www.developerfusion.com/res/content/8307/figure4/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Figure 4 - The Repository Pattern&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(216, 216, 216); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; color: #2e2e2e; font-family: Arial; font-size: 1.3em; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 5px;&quot;&gt;

The Singleton Pattern&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The Singleton pattern defines the creation of a class for which only a single instance can exist. It is useful for exposing read-only data, and static methods that do not rely on instance data. Rather than creating an instance of the class each time, the application obtains a reference to an existing instance using a static method of the class that implements the Singleton pattern.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
If this is the first call to the method that returns the instance, the Singleton creates an instance, populates it with any required data, and returns that instance. Subsequent calls to the method simply return this instance. The instance lifetime is that of the application domain - in ASP.NET this is usually the lifetime of the domain Application object.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/848434494318073852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2011/09/aspnet-patterns-every-developer-should.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/848434494318073852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/848434494318073852'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2011/09/aspnet-patterns-every-developer-should.html' title='ASP.NET Patterns every developer should know'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-8760920560450838459</id><published>2011-09-10T15:42:00.000+02:00</published><updated>2011-09-10T15:42:03.140+02:00</updated><title type='text'>The maximum amount of memory any single process on Windows can address.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; line-height: 12px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Processes access virtual memory space, not physical memory. Applications never access RAM directly but only through the memory management interface of the processor.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Depending on which version of Windows you are using, and how the program was compiled there is a differnt maximum ammount of addressable memory.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;All 32 bit processes on 32bit Windows have a 4GB virtual address space. The upper 2GB is common to all processes and is used by the system. The lower 2GB is private to each process and is inaccessable to all others. Unless the program was compiled as large address aware, in which case it will have 3GB of private address space.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;For 32bit processes on 64bit Windows, each process has 2GB private address space, unless compiled large address aware in which case it has 4GB private adress space.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;For 64bit processes on 64bit windows each process has 8TB of private address space whilst compiled as large address aware. The 2GB address space limit remains for programs not compiled as large address aware.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;This is completely independent of the size of RAM or the pagefile. The system maps physical memory into this virtual address space according to both need and availability.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;At any given time the data in virtual memory space might be stored in RAM, on disk, or both. All of this is totally transparent to all applications. Frequently accessed data will be kept in RAM with the remainder left on disk.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;br /&gt;&lt;br /&gt;Read more:&amp;nbsp;&lt;a href=&quot;http://wiki.answers.com/Q/What_is_the_maximum_amount_of_memory_any_single_process_on_Windows_can_address_and_is_this_different_from_the_maximum_virtual_memory_for_the_system#ixzz1XYaEzREU&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; color: #003399; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;http://wiki.answers.com/Q/What_is_the_maximum_amount_of_memory_any_single_process_on_Windows_can_address_and_is_this_different_from_the_maximum_virtual_memory_for_the_system#ixzz1XYaEzREU&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/8760920560450838459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2011/09/maximum-amount-of-memory-any-single.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/8760920560450838459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/8760920560450838459'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2011/09/maximum-amount-of-memory-any-single.html' title='The maximum amount of memory any single process on Windows can address.'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-3394156556767036195</id><published>2011-09-10T15:35:00.005+02:00</published><updated>2011-09-10T15:35:40.310+02:00</updated><title type='text'>Difference Between Thread and Process</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #e4e2db; font-family: Georgia, &#39;Times New Roman&#39;, Times, serif; font-size: 17px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Thread vs Process&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Process&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;In the world of&amp;nbsp;computer&amp;nbsp;programming, a process is an instance or execution of a program. Every process contains a program code and the existing activity. There can be more than one thread that may make up a particular process. Instructions may be executed concurrently. However, it will depend on the operating system being used.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Basically, processes are heavily substantial programs. They consume considerable amounts of memory. Therefore, they are greatly dependent on the resources available for execution. Having said all of these, a process is known to be a “heavyweight process”.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Every process occurs at a different memory location. Therefore, if there are more processes present, the switching between each process is heavily expensive as it will take time from each memory allocation to switch to another allocation. Each process has its own address space which may gobble substantial amounts of supply.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;A process is independent of other processes. So, when a parent process is modified it won’t necessarily affect other processes. Because of this behavior, processes require inter-process communication so they can communicate with their siblings.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;Furthermore, processes, due to their&amp;nbsp;much&amp;nbsp;more complex nature, are not created with ease. This may require some duplication of processes, typically parent process, to achieve construction.&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #e4e2db; font-size: 17px;&quot;&gt;&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Thread&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Even with minimal system resources, threads are able to be executed simultaneously to attain a specified task. The reason is the&amp;nbsp;fact&amp;nbsp;that a thread is only an execution sequence. It is merely within a process and that is why it is also referred to as a “lightweight process”.&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
It is considered as the smallest part of a program as it is an independent sequential path of execution within a program. The context switching between threads requires minimal amounts of resource unlike processes. Threads, in essence, share address spaces and they are also easily created.&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
It should also be mentioned that changes made into the main thread may have an effect on the behavior of the other threads within the same process. Apparently, communication between threads in the same process is direct and seamless.&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;b&gt;Summary:&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 27px; margin-bottom: 15px; margin-top: 15px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
1. A process can contain more than one thread.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;2. A process is considered as “heavyweight” while a thread is deemed as “lightweight”.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;3. Processes are heavily dependent on system resources available while threads require minimal amounts of resource.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;4. Modifying a main thread may affect subsequent threads while changes on a parent process will not necessarily affect child processes.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;5. Threads within a process communicate directly while processes do not communicate so easily.&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;6. Threads are easy to create while processes are not that straightforward.&lt;/div&gt;
&lt;/span&gt;&lt;/span&gt;Ref:&amp;nbsp;&lt;a href=&quot;http://www.differencebetween.net/miscellaneous/difference-between-thread-and-process/&quot;&gt;http://www.differencebetween.net/miscellaneous/difference-between-thread-and-process/&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/3394156556767036195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2011/09/difference-between-thread-and-process.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/3394156556767036195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/3394156556767036195'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2011/09/difference-between-thread-and-process.html' title='Difference Between Thread and Process'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-3442776330237891684</id><published>2010-12-19T14:24:00.001+02:00</published><updated>2010-12-19T14:24:32.375+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Connection Strings"/><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Connection Strings Ref</title><content type='html'>&lt;a href=&quot;http://www.connectionstrings.com/&quot;&gt;http://www.connectionstrings.com/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/3442776330237891684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2010/12/connection-strings-ref.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/3442776330237891684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/3442776330237891684'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2010/12/connection-strings-ref.html' title='Connection Strings Ref'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-2423722144730548439</id><published>2010-12-19T14:15:00.000+02:00</published><updated>2010-12-19T14:15:12.696+02:00</updated><title type='text'>Visual Studio project templates are missing</title><content type='html'>&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;From command&amp;nbsp;prompt, Run:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;devenv /installvstemplates&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/2423722144730548439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2010/12/visual-studio-project-templates-are.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/2423722144730548439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/2423722144730548439'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2010/12/visual-studio-project-templates-are.html' title='Visual Studio project templates are missing'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-2062636920785238951</id><published>2010-10-25T09:05:00.000+02:00</published><updated>2010-10-31T07:04:26.209+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Build Providers"/><title type='text'>Build Providers</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Build Providers can be used by two entities in the development cycle, The build provider is first used is during te developemnt when you are building youe solution in VS 2010. For Instance when placing a CS file in App_Code folder IDE give you automatic the access to it&#39;s classes and their method instantly.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;The other entity that use the build provider is the ASP.NET itself, if you&amp;nbsp;drag&amp;nbsp;and&amp;nbsp;drop&amp;nbsp;a CS file in the App_Code folder of deployed application automatically gives the application access to the classes in the CS file.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;A build provider is simply a class that inherits from&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;System.Web.Compilation.BuildProvider&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;the &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;lt;buildProviders&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt; section in web.config file allows you to list the build providers classes that will be utilized.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;lt;add extension=&quot;.wsdl&quot; Type=&quot;System.web.Compilation.WsdlBuildProvider&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Using the Built-in Build Providers&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ForeceCopyBuildProvider &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;is basically copies only those files for deployment that use the defined extensions, you can add other file types that you want to be part of this copy process.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;add extension=&quot;.chm&quot; Type=&quot;System.Web.Compilation.ForceCopyBuildProvider&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;The &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;IgnoreFileBuildProvider &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;causes the defined files to be ignored form in the deployment or compilation process.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;add extension=&quot;.vsd&quot; Type=&quot;System.Web.Compilation.IgnoreFileBuildProvider&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;References: &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/magazine/cc163656.aspx#S3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;http://msdn.microsoft.com/en-us/magazine/cc163656.aspx#S3&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://www.pluralsight-training.net/community/blogs/fritz/archive/2004/09/06/2188.aspx&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;http://www.pluralsight-training.net/community/blogs/fritz/archive/2004/09/06/2188.aspx&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/2062636920785238951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2010/10/build-providers.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/2062636920785238951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/2062636920785238951'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2010/10/build-providers.html' title='Build Providers'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-7232560413676917544</id><published>2010-10-25T08:35:00.000+02:00</published><updated>2010-10-25T08:36:01.797+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Init"/><category scheme="http://www.blogger.com/atom/ns#" term="Page Events"/><category scheme="http://www.blogger.com/atom/ns#" term="PreInit"/><category scheme="http://www.blogger.com/atom/ns#" term="Prerender"/><category scheme="http://www.blogger.com/atom/ns#" term="UnLoad"/><title type='text'>ASP.NET Page Events</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;b&gt;ASP.NET 1.0/1,1 Page events are&lt;/b&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;AbortTransaction&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;ComitTransaction&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;DataBinding&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Disposed&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Error&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Init&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Load&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;PreRender&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Unload&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;b&gt;ASP,NET 4.0 Page events in order are&lt;/b&gt;:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;PreInit&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Init&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;InitComplete&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;PreLoad&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Load&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;LoadComplete&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;PreRender&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;PreRenderComplete&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Unload&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/7232560413676917544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2010/10/aspnet-page-events.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/7232560413676917544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/7232560413676917544'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2010/10/aspnet-page-events.html' title='ASP.NET Page Events'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-1013954654918304880</id><published>2010-10-24T09:49:00.001+02:00</published><updated>2010-10-25T08:21:17.308+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Directive"/><category scheme="http://www.blogger.com/atom/ns#" term="OutputCache"/><category scheme="http://www.blogger.com/atom/ns#" term="Pages Directives. Cahce"/><title type='text'>Pages Directives</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;These directives like:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #073763;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fff2cc;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeBehind=&quot;Default.aspx.cs&quot; Inherits=&quot;TopTenEgypt._Default&quot; %&amp;gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;General syntax:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #073763;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;lt;%@ [&lt;i&gt;Directive&lt;/i&gt;] [&lt;i&gt;Attribute=value&lt;/i&gt;]&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #fff2cc;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #073763;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;[&lt;i&gt;Attribute=value&lt;/i&gt;]&amp;nbsp;%&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Directives are:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Assembly&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: To link an assembly to a page or user control.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Control&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: User controls, ASCX files.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Implements&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Implement a .NET Framework interface&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Import&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Imports a namespace into a page or a user control.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Master&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: a Master page&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;MasterType&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Associate a class name to a page to get a strongly typed&amp;nbsp;references&amp;nbsp;or members of the specified master page.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;OutputCache&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: To control the output cache of the page or user control.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Page&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: used with ASPX files to specify the page attributes.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;PreviousPageType&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: enable the page to work with post back from another page in the application.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Reference&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: To link another page or user control to the current page or user control.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Register&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: To associate aliases with namespaces and class names for notation in customer server control syntax.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Directives attributes:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;AspCompat&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;:&lt;b&gt; &lt;/b&gt;To permit the page to be executed on a single-threaded apartment thread [Default=False]&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Async&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: To specify the page to be processed&amp;nbsp;synchronously&amp;nbsp;or&amp;nbsp;asynchronously&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;AsyncTimeout&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: the amount of time to wait the async task to complete [default=45 Sec]&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Buffer&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: To enable HTTP response buffering [default=True]&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;ClassName&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: the class that is bound to the page when the page is compiled.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;ClientIDMode&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;:&amp;nbsp;Specify&amp;nbsp;how the page generate the ClientID values for its server controls&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;ClientTarget&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Specify the taget user agent the control should render content for, Should be tied to an alias in Web.config file in &amp;lt;ClientTarget&amp;gt; Section.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;CodeFile&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: The Code-behind file&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;CompilationMode&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: ASP.NET should compile the page or not [Auto,never, Always]&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;CompilerOptions&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Compilation Options of the page.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;CompileWith&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: the code-behind file used (?)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;ContentType&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;:the content type of the HTTP response as MIME Type.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Culture&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: the culture attribute of the page, can be Auto.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Debug&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: If True, compile the page with debug symbols in place.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;EnableEventValidation&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: If true, validate the events in&amp;nbsp;post-back&amp;nbsp;and callback.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;EnableSessionState&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: To Enable/disable the session state for the page.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;EnableTheming&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: If True, the page is enabled to use themes.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;EnableViewstate&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: If True,&amp;nbsp;View state&amp;nbsp;is&amp;nbsp;maintained&amp;nbsp;across the page.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;EnableViewstateMac&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: If true, page runs a machine-authenticated&amp;nbsp;check on the page view state when the page is posted back.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;ErrorPage&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: an URL to post in case of all unhandeled page exceptions.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Langauge&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;LCID: &lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Defined the Locale Identifier for web form&#39;s page.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;LinePragmas&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: weather line pragmas are used with the resulting assembly.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;MasterPageFile&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Used with content pages to points to the master page file (.master).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;MaintainScrollPositionOnPostback&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;MetaDescription (&lt;i&gt;ASP.NET 4.0&lt;/i&gt;)&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Page description for SEO purposes.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Metakeywords (ASP.NET 4.0)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;ResponseEncoding&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;SmartNavigation&lt;/span&gt;&lt;/u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: &lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;like&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;MaintainScrollPositionOnPostback&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Src&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Points to the source file of the class used for the code behind of the page being rendered.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Strict&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: (&lt;b&gt;&lt;i&gt;VB&lt;/i&gt;&lt;/b&gt;)If true,Compile page in Strict Mode&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Theme&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Applying the specified theme on the page.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;StyleSheetTheme&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;:&lt;b&gt;&amp;nbsp;&lt;/b&gt;like&lt;b&gt;&amp;nbsp;Theme,&amp;nbsp;&lt;/b&gt;but&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;StyleSheetTheme&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;wont override preexisting style setting in the controls.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Title&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Trace&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: If true, enable Trace messages on the page.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;TraceMode&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: like SortByTime, SortByCategory&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Transaction&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Specify weather transacctions are supported on the page. [Default=False].&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;UICulture&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: which UI Culture to use on the page, use Auto to automatic detection of UI culture.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;ValidateRequest&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: If True, the page inputs are checked against a list of potential&amp;nbsp;dangerous&amp;nbsp;values to protecet your application from attacks like&amp;nbsp;JavaScript&amp;nbsp;attacks.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;ViewStateEncriptionMode&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Specify how the view-state are&amp;nbsp;encrypted [Default=Auto]&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;direction: ltr;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;WarningLevel&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Specify the compiler warning level at which stop compilation of the page.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;@PreviousPageType&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Used to specify the page from which any cross-page posting originates.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Attributes:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;ol style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;TypeName: the name of the class from which the post-back will occur.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;VirtualPath: the locati&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;@OutputCache&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Controls the output cahcing polices of ASp.NET page or use control.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Attributes:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;CacheProfile&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: To central the way of managing an application cache profile, use the CacheProfile detailed in web.config file.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Duration&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: the caching time in seconds&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Location&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: works with ASPX files only, values [None, DownStream, Client, Server, ServerAndClient].&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;NoStore&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: To send No-Store header with the page.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Shared&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Specify weather a user control output can be shared across a multiple pages&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;SqlDependecy&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: To enable the page to use SqlDependency.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;VaryByControl&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: Semicolon-separated&amp;nbsp;list of strings used to vary the output cache of a &amp;nbsp;user control.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;CaryByCustom&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;: String specifing the custom output cacheing requirement.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;VaryByParm&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;:&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Semicolon-seperated list of strings used to vary the output cache.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;VaryByHeader&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Semicolon-seperated list of HTTP headers used to vary the output cache&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/1013954654918304880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2010/10/aspnet-40-pages-directives.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/1013954654918304880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/1013954654918304880'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2010/10/aspnet-40-pages-directives.html' title='Pages Directives'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-3417446830082354524</id><published>2010-10-24T09:49:00.000+02:00</published><updated>2010-10-24T09:49:13.224+02:00</updated><title type='text'>ASP.NET Acronyms</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0b5394;&quot;&gt;&lt;b&gt;SEO&lt;/b&gt;:&amp;nbsp;&lt;b&gt;S&lt;/b&gt;earch &lt;b&gt;E&lt;/b&gt;ngine&amp;nbsp;&lt;b&gt;O&lt;/b&gt;ptimization&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/3417446830082354524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2010/10/aspnet-acronyms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/3417446830082354524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/3417446830082354524'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2010/10/aspnet-acronyms.html' title='ASP.NET Acronyms'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5430773937555715880.post-6683841749323049361</id><published>2010-10-24T07:54:00.000+02:00</published><updated>2010-10-24T08:12:17.904+02:00</updated><title type='text'>Do you know that..!</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 13px; color: rgb(85, 85, 85); &quot;&gt;The bullet-in Web Server in visual studio 2008/2010 was previously presented as a code sample project called &lt;b&gt;Cassini&lt;/b&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 13px; color: rgb(85, 85, 85); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://aspdotnet4.blogspot.com/feeds/6683841749323049361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aspdotnet4.blogspot.com/2010/10/do-you-know-that.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/6683841749323049361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5430773937555715880/posts/default/6683841749323049361'/><link rel='alternate' type='text/html' href='http://aspdotnet4.blogspot.com/2010/10/do-you-know-that.html' title='Do you know that..!'/><author><name>Peter Sobhy</name><uri>http://www.blogger.com/profile/00117989163002200409</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOhfyuxkK9dH1gCPx6x6D6taiHlBSjrvlYNvBJ4pPQDV-vslFeH7_mu7-hDw2jCQeV6ZuMhhsuXb_5apYiD5K_CW09VifOhzao9FzlXmfsvLv5f_fTzC8IkxmKVfxv2VA/s113/13310330_10154124040485185_5778803086290687794_n.jpg'/></author><thr:total>0</thr:total></entry></feed>