<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AllAboutASP.NET &#187; ASP.net</title>
	<atom:link href="http://allaboutasp.net/category/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://allaboutasp.net</link>
	<description>Your .Net Zone</description>
	<lastBuildDate>Thu, 16 Jun 2011 14:21:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Trust Levels in ASP.net</title>
		<link>http://allaboutasp.net/2010/05/trust-levels-in-asp-net/</link>
		<comments>http://allaboutasp.net/2010/05/trust-levels-in-asp-net/#comments</comments>
		<pubDate>Thu, 06 May 2010 01:31:45 +0000</pubDate>
		<dc:creator>Ajay Pathak</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[ASP.NET 4.0]]></category>
		<category><![CDATA[ASP.NET 4.0 Hosting]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Trust Level]]></category>
		<category><![CDATA[Web.config]]></category>

		<guid isPermaLink="false">http://allaboutasp.net/2010/05/trust-levels-in-asp-net/</guid>
		<description><![CDATA[Trust levels let you define security rules. They define what types of operations an application can perform, such as reading from disk or accessing the registry. Each trust level has an associated policy file, except for Full trust. When an application runs with Full trust, code access security places no restrictions on the resources and [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">Trust levels let you define security rules. They define what types of operations an application can perform, such as reading from disk or accessing the registry. Each trust level has an associated policy file, except for Full trust. When an application runs with Full trust, code access security places no restrictions on the resources and operations that the application is allowed to access. Access to resources is based on operating system security and Microsoft Windows® access control lists (ACLs). Full trust is mapped to an internal handler, so it is not possible to edit the user rights to perform operations for an application. Full trust is effectively the absence of an application domain policy, and therefore it never has an associated policy file. </p>
<p align="justify">To protect ASP.NET applications, you can restrict access to resources and the operations that they can perform. You do this by setting the &lt;trust&gt; element to a predefined trust level in either the machine-level Web.config file or the application’s Web.config file.</p>
<p align="justify">The following list describes the predefined trust levels:</p>
<h2 align="justify"><b>Full</b>&#160;</h2>
<p align="justify">Applications that run at Full trust level can execute arbitrary native code in the process context in which they run. Because of the inherent risks that come with running in Full trust mode, this mode is not recommended in a shared environment except when every Web site uses its own application pool and application pool identity.</p>
<blockquote><p align="justify"><b>Important</b>&#160;&#160; The default trust level is Full trust. You should evaluate the security requirements for your environment and set the trust level appropriately.</p>
</blockquote>
<h2 align="justify"><b>High</b>&#160;</h2>
<p align="justify">Code in High trust applications can use most .NET Framework permissions that support partial trust. This mode is often appropriate for trusted applications that you want to run with fewer user rights in order to mitigate risks. For example, this level provides the same access as Full trust, but restricts access to unmanaged code and COM interop.</p>
<h2 align="justify"><b>Medium</b></h2>
<p align="justify">Code in Medium trust applications can read and write in its own application directories and can interact with Microsoft SQL Server™ databases. However, by default, the user rights that are needed to access OLE DB and ODBC are not granted to Medium trust applications. Medium trust is the recommended setting for a shared server, because it allows connections to SQL Server databases and restricts most other user rights to the application root structure.</p>
<h2 align="justify"><b>Low</b>&#160;</h2>
<p align="justify">Code in Low trust applications can read its own application resources but cannot make any out-of-process calls, such as calls to a database, to the network, and so on. By using Low trust, you effectively lock applications down to their application directory and remove all access to system resources.</p>
<h2 align="justify"><b>Minimal</b></h2>
<p align="justify">Code in Minimal trust applications can execute but cannot interact with any protected resources. Minimal trust may be appropriate for mass hosting sites that want to support dynamic generation of Hypertext Markup Language (HTML) and isolated business logic.</p>
<p align="justify">The definition of the trust levels is essentially the same from ASP.NET version 1.1 through version 4. However, some of the user rights or operations that can be granted at each trust level vary slightly. For example, in ASP.NET 2.0 and later, Medium trust code can enable access to OLE DB APIs.</p>
<p align="justify">For information about how to run ASP.NET applications in a hosted environment, including trust levels and code access security, download the <a href="http://www.microsoft.com/Downloads/details.aspx?FamilyID=f4d690eb-4a9b-4b3b-951a-0d2eb93927ac&amp;displaylang=en">Microsoft Solution for Windows-based Hosting version 3.5</a> tool kit from the Microsoft download center. For information about hosting environments and architecture, see the <a href="http://go.microsoft.com/fwlink/?LinkId=155804">Hosting Guidance for the Microsoft Web Platform</a> on the IIS.net Web site. </p>
]]></content:encoded>
			<wfw:commentRss>http://allaboutasp.net/2010/05/trust-levels-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bing &amp; Ping: Share Bing Search Results With Your Friends</title>
		<link>http://allaboutasp.net/2009/09/bing-ping-share-bing-search-results-with-your-friends/</link>
		<comments>http://allaboutasp.net/2009/09/bing-ping-share-bing-search-results-with-your-friends/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 03:34:24 +0000</pubDate>
		<dc:creator>Ajay Pathak</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[Bing]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://allaboutasp.net/2009/09/bing-ping-share-bing-search-results-with-your-friends/</guid>
		<description><![CDATA[Bing team in Microsoft working very hard to add more and more new feature in Bing. Bing team is now trying to build a bridge between Bing search results and social networking website. Bing &#38; Ping will enable users to share their Bing search results with their friends on different social networking websites. How Bing [...]]]></description>
			<content:encoded><![CDATA[<p>Bing team in Microsoft working very hard to add more and more new feature in Bing. Bing team is now trying to build a bridge between Bing search results and social networking website. Bing &amp; Ping will enable users to share their Bing search results with their friends on different social networking websites. </p>
<h2>How Bing &amp; Ping would Work ?</h2>
<p>&#160;</p>
<p>Bing &amp; Ping will appear at the bottom of search results and users will be able to share these search results information with their friends via Social networking websites including Facebook, Twitter or they can simply send them an E-Mail. </p>
<p>Bing &amp; Ping allow Bing users to share any kind of search results with their friends. </p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Bing &amp; Ping" border="0" alt="Bing &amp; Ping" src="http://allaboutasp.net/wp-content/uploads/2009/09/bing-and-ping.jpg" width="525" height="278" /> </p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Bing &amp; Ping" border="0" alt="Bing &amp; Ping" src="http://allaboutasp.net/wp-content/uploads/2009/09/bing-and-ping-1.jpg" width="525" height="267" /> </p>
<p>Bing &amp; Ping is not yet available for testing yet but Microsoft only delivered a taste of the feature in the screenshots included with this article. If you’re interested in previewing this feature, be sure to become a fan of our <a href="http://facebook.com/bing">Facebook page</a>. Microsoft will be sending a special invitation to our fans to preview Bing and Ping. Check it out and let Bing team know what you think, if you like it and how Bing Team can make it better. </p>
]]></content:encoded>
			<wfw:commentRss>http://allaboutasp.net/2009/09/bing-ping-share-bing-search-results-with-your-friends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET 4.0 Roadmap</title>
		<link>http://allaboutasp.net/2009/08/aspnet-40-roadmap/</link>
		<comments>http://allaboutasp.net/2009/08/aspnet-40-roadmap/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 01:30:13 +0000</pubDate>
		<dc:creator>Ajay Pathak</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[.Net 4.0]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://allaboutasp.net/2009/08/aspnet-40-roadmap/</guid>
		<description><![CDATA[Take a walk through the 4.0 landscape from ASP.NET and learn how you can get involved in shaping ASP.NET future. This talk focuses on the next release of ASP.NET including Web Forms and MVC. Do you love web forms? See how you can taking control of your control IDs, learn about better ViewState managment in [...]]]></description>
			<content:encoded><![CDATA[<p>Take a walk through the 4.0 landscape from ASP.NET and learn how you can get involved in shaping ASP.NET future. This talk focuses on the next release of ASP.NET including Web Forms and MVC. Do you love web forms? See how you can taking control of your control IDs, learn about better ViewState managment in GridView and ListView, and get more control over the CSS markup of ASP.NET server controls. See how Dynamic Data makes building you data-driven apps easy. If you’re interested in AJAX, we show you further advancements in client rendering and binding. If you’re considering MVC, we look at the feature set and understand how to create applications with this technology.</p>
<p> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="314" id="viddler"><param name="movie" value="http://www.viddler.com/player/c8ab8e90/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/c8ab8e90/" width="437" height="314" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler"></embed></object>
<p>&#160;</p>
<p>Via <a href="http://dotnet-tv.com" target="_blank">Dot Net TV</a></p>
]]></content:encoded>
			<wfw:commentRss>http://allaboutasp.net/2009/08/aspnet-40-roadmap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Professional VB.Net Programming</title>
		<link>http://allaboutasp.net/2009/07/professional-vbnet-programming/</link>
		<comments>http://allaboutasp.net/2009/07/professional-vbnet-programming/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 02:00:31 +0000</pubDate>
		<dc:creator>Ajay Pathak</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[Vb.net]]></category>

		<guid isPermaLink="false">http://allaboutasp.net/2009/07/professional-vbnet-programming/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><iframe style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" height="500" src="http://books.google.com/books?id=y0uURUiVhgwC&amp;lpg=PP23&amp;dq=professional%20vb.net%202008&amp;pg=PA64&amp;output=embed" frameborder="0" width="500" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://allaboutasp.net/2009/07/professional-vbnet-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Overview of HTTP Handlers</title>
		<link>http://allaboutasp.net/2009/05/an-overview-of-http-handlers/</link>
		<comments>http://allaboutasp.net/2009/05/an-overview-of-http-handlers/#comments</comments>
		<pubDate>Sat, 30 May 2009 02:43:17 +0000</pubDate>
		<dc:creator>Ajay Pathak</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[HTTP Handler]]></category>

		<guid isPermaLink="false">http://allaboutasp.net/2009/05/an-overview-of-http-handlers/</guid>
		<description><![CDATA[An HTTP handler is a process that runs on server to response to a particular type of request. HTTP handlers can be referred to as endpoint also. A typical example of HTTP handlers is when ASP.net page handler which is used by asp.net engine to process the request that come for .aspx files. Built In [...]]]></description>
			<content:encoded><![CDATA[<p>An HTTP handler is a process that runs on server to response to a particular type of request. HTTP handlers can be referred to as endpoint also. A typical example of HTTP handlers is when ASP.net page handler which is used by asp.net engine to process the request that come for .aspx files. </p>
<p>Built In HTTP Handlers in ASP.net</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200">Handler</td>
<td valign="top" width="200">Description</td>
</tr>
<tr>
<td valign="top" width="200">ASP.net Page Handler (*.aspx)</td>
<td valign="top" width="200">A default page handler for all ASP.net pages.</td>
</tr>
<tr>
<td valign="top" width="200">Web Service handler(*.mspx)</td>
<td valign="top" width="200">The default HTTP handler for Web service pages created as .asmx files in ASP.NET. </td>
</tr>
<tr>
<td valign="top" width="200">
<p>Generic Web handler (*.ashx)</p>
</td>
<td valign="top" width="200">The default HTTP handler for all Web handlers that do not have a UI and that include the @ WebHandler directive. </td>
</tr>
<tr>
<td valign="top" width="200">
<p>Trace handler (trace.axd)</p>
</td>
<td valign="top" width="200">A handler that displays current page trace information. For details, see How to: View ASP.NET Trace Information with the Trace Viewer. </td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<h2>How to Create A Custom HTTP Handler</h2>
<p>To create a custom HTTP Handler you need to implement either IHttpHandler or IHttpAsyncHandler for synchronous and asynchronous handlers. Both these interfaces expose two methods called IsReusable and ProcessRequest. ProcessRequest method is the place where you write code for handling request of your custom handler. The IsReusable property specifies whether the IHttpHandlerFactory object (the object that actually calls the appropriate handler) can put the handler in a pool and reuse it to increase performance. If the handler cannot be pooled, the factory must create a new instance of the handler every time that the handler is needed. </p>
<pre class="code"><span style="color: blue">Public Class </span>CustomHand
    <span style="color: blue">Implements </span>IHttpHandler

    <span style="color: blue">Public ReadOnly Property </span>IsReusable() <span style="color: blue">As Boolean Implements </span>System.Web.IHttpHandler.IsReusable
        <span style="color: blue">Get

        End Get
    End Property

    Public Sub </span>ProcessRequest(<span style="color: blue">ByVal </span>context <span style="color: blue">As </span>System.Web.HttpContext) <span style="color: blue">Implements </span>System.Web.IHttpHandler.ProcessRequest

    <span style="color: blue">End Sub
End Class
</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h2>Mapping File Extension in IIS</h2>
<p>By Default IIS is going to respond to file extension that is for custom handler. If you created a new file extension for HTTP Handler then you have to explicitly register the file extension in IIS and have to add a mapping entry in web.config file for your custom handler.</p>
]]></content:encoded>
			<wfw:commentRss>http://allaboutasp.net/2009/05/an-overview-of-http-handlers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.Net Exception Handling-Part I</title>
		<link>http://allaboutasp.net/2009/04/aspnet-exception-handling-part-i/</link>
		<comments>http://allaboutasp.net/2009/04/aspnet-exception-handling-part-i/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 02:54:20 +0000</pubDate>
		<dc:creator>Ajay Pathak</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ApplicationException.SystemException]]></category>
		<category><![CDATA[Exception Class]]></category>

		<guid isPermaLink="false">http://allaboutasp.net/2009/04/aspnet-exception-handling-part-i/</guid>
		<description><![CDATA[.Net languages support structured exception handling means when ever an exception occurs .Net framework creates an exception object, this exception object represents complete information about the exception. You can catch this exception object using the try catch block code if your application failed to catch the exception then you see a error page like this [...]]]></description>
			<content:encoded><![CDATA[<p>.Net languages support structured exception handling means when ever an exception occurs .Net framework creates an exception object, this exception object represents complete information about the exception. You can catch this exception object using the try catch block code if your application failed to catch the exception then you see a error page like this </p>
<p><a href="http://allaboutasp.net/wp-content/images/ASP.NetExceptionHandling_6A87/ExceptionHandling.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Exception Handling" border="0" alt="Exception Handling" src="http://allaboutasp.net/wp-content/images/ASP.NetExceptionHandling_6A87/ExceptionHandling_thumb.jpg" width="525" height="328" /></a> </p>
<p>Structured Exception Handling Features</p>
<ul>
<li>Exceptions are objects means each exception wrapped with significant amount of useful information about exception instead of just plain text explaining the exception message or cause of exception. These exception objects also support an InnerException property that allows you to wrap a generic error over the more specific error that caused it. You can even create and throw your own exception objects. </li>
<li>Exception can be caught based on their type means you can catch specific type of exception following code show an example of this </li>
</ul>
<pre class="code"><span style="color: blue">Try
    </span>IO.File.Open(<span style="color: #a31515">&quot;F:\testfile.text&quot;</span>, IO.FileMode.Open)

<span style="color: blue">Catch </span>ex <span style="color: blue">As </span>IO.FileNotFoundException
    Console.WriteLine(<span style="color: #a31515">&quot;File Not found&quot;</span>)
<span style="color: blue">Catch </span>ex <span style="color: blue">As </span>IO.PathTooLongException
    Console.WriteLine(<span style="color: #a31515">&quot;File Path is to long&quot;</span>)
<span style="color: blue">End Try</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<ul>
<li>Exception handlers can also be used in layered manner means you can always create exception handlers on top of other exception handlers for different section of code to handle their exception separately. </li>
<li>Exceptions are generic part of .Net framework. </li>
</ul>
<p>&#160;</p>
<h2>Exception Class Overview </h2>
<p>Exception class is base class for all exception classes. Exception class defines two type of exceptions </p>
<ul>
<li><font color="#800040" size="4" face="Calibri">SystemException</font>: This class provides a means to differentiate exception caused by system or application. SystemException does not provide information about the cause of exception and try to avoid throwing instance of this class , if there are cases when you want to throw or created object of this class , a human readable message describing the error should be passed to the constructor. </li>
<li><font color="#800040" size="4" face="Calibri">ApplicationException</font>: The ApplicationException class differentiates between exceptions defined by applications versus exceptions defined by the system. If you are creating your own exception class then it is always advised to derive custom exception class from Exception class. Deriving custom exception class from ApplicationException class does not add any significant value to derived class. </li>
</ul>
<h2>Exception Class Properties</h2>
<p>Exception includes a number of properties that help identify the code location, the type, the help file, and the reason for the exception: StackTrace, InnerException, Message, HelpLink, HResult, Source, TargetSite, and Data. </p>
<p>In Next article we will discuss more about exception class members and how to write a exception handling block. </p>
]]></content:encoded>
			<wfw:commentRss>http://allaboutasp.net/2009/04/aspnet-exception-handling-part-i/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ASP.NET State Management Overview</title>
		<link>http://allaboutasp.net/2009/04/aspnet-state-management-overview/</link>
		<comments>http://allaboutasp.net/2009/04/aspnet-state-management-overview/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 08:44:43 +0000</pubDate>
		<dc:creator>Ajay Pathak</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[Application State]]></category>
		<category><![CDATA[Control State]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[Hidden Fields]]></category>
		<category><![CDATA[Profile Properties]]></category>
		<category><![CDATA[Query String]]></category>
		<category><![CDATA[Session state]]></category>
		<category><![CDATA[state management]]></category>
		<category><![CDATA[View State]]></category>

		<guid isPermaLink="false">http://allaboutasp.net/2009/04/aspnet-state-management-overview/</guid>
		<description><![CDATA[As HTTP is stateless, meaning the connection to the server does not remain open. When ever page is post back to server a new instance of the class is created this means there is a overhead of loading all the values associated with controls that are present on the page because http is a stateless [...]]]></description>
			<content:encoded><![CDATA[<p>As HTTP is stateless, meaning the connection to the server does not remain open. When ever page is post back to server a new instance of the class is created this means there is a overhead of loading all the values associated with controls that are present on the page because http is a stateless protocol and each round trip to the server causes controls to loose their values. To overcome the inherent limitation of http protocol ASP.NET includes several options that help you preserve data on both a per-page basis and an application-wide basis. These features are as follows:</p>
<h2>View state</h2>
<p>View state is the method that the ASP.NET page framework uses to preserve page and control values between round trips. When the HTML markup for the page is rendered, the current state of the page and values that must be retained during postback are serialized into base64-encoded strings. This information is then put into the view-state hidden field or fields.</p>
<h2>Control state</h2>
<p>Control state is used to store the state information specific to control. This property is very useful when you are creating custom control and want to know the current state of control.  AS compare to view state property which can be turned off by developer at page level and that can cause your control to break, in case of control state property that can not be turned off like view state.</p>
<h2>Hidden fields</h2>
<p>Hidden fields are controls that provide a way to store information and at the same time they are not visible to the user. When a page is submitted to the server, the content of a hidden field is sent in the HTTP form collection along with the values of other controls. A hidden field acts as a repository for any page-specific information that you want to store directly in the page. It is easy to see and modify the hidden field value so it is always recommend that never store sensitive information in Hidden field.</p>
<h2>Cookies</h2>
<p>Cookies are basically small text files that are used to store small amount of data on client file system. Cookies can also be stored in clients main memory. Cookies can be temporary (with specific expiration times and dates) or persistent. Generally cookies are used to store information about a particular client, session or application. When a client send a request to the server, browser also sent the cookie to the server, Server then extracts value from the cookie. Typically cookies are encrypted and used for storing user authentication information and user profile preferences.</p>
<pre class="code">Response.Cookies(<span style="color: #a31515">"destination"</span>).Value = <span style="color: #a31515">"CA"
</span>Response.Cookies(<span style="color: #a31515">"destination"</span>).Expires = DateTime.Now.AddDays(1)</pre>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<h2>Query strings</h2>
<p>Query String is a key value pair that is appended at the end of url with a question mark (?). Query string is a very simple way to send information to the server but it is highly browser dependant. Different browsers have different length for query string. Information passed through query string is easily viewed by the client so query string is not a good option for sending sensitive information to the server.</p>
<p>View state, control state, hidden fields, cookies, and query strings all involve storing data on the client in various ways.</p>
<h2>Application state</h2>
<p>Application state is a data repository available to all classes in an ASP.NET application. Application state is stored in memory on the server and is faster than storing and retrieving information in a database. Unlike session state, which is specific to a single user session, application state applies to all users and sessions. Therefore, application state is a useful place to store small amounts of often-used data that does not change from one user to another. Application state is stored in an instance of the HttpApplicationState class. This class exposes a key-value dictionary of objects. The HttpApplicationState instance is created the first time a user accesses any URL resource in an application. The HttpApplicationState class is most often accessed through the Application property of the HttpContext class.</p>
<pre class="code">Application(<span style="color: #a31515">"WelcomeMessage"</span>) = <span style="color: #a31515">"Welcome to the Contoso site."</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h2>Session state</h2>
<p>ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. HTTP is a stateless protocol. This means that a Web server treats each HTTP request for a page as an independent request. The server retains no knowledge of variable values that were used during previous requests. ASP.NET session state identifies requests from the same browser during a limited time window as a session, and provides a way to persist variable values for the duration of that session. By default, ASP.NET session state is enabled for all ASP.NET applications.</p>
<pre class="code">Session(<span style="color: #a31515">"FirstName"</span>) = FirstNameTextBox.Text
Session(<span style="color: #a31515">"LastName"</span>) = LastNameTextBox.Text</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h2>Profile Properties</h2>
<p>Profile property is a new feature in ASP.ne that allow you to store user specific data this some thing like session but profile information is not lost when a user session is expire. The profile-properties feature uses an ASP.NET profile, which is stored in a persistent format and associated with an individual user. The ASP.NET profile allows you to easily manage user information without requiring you to create and maintain your own database. In addition, the profile makes the user information available using a strongly typed API that you can access from anywhere in your application. You can store objects of any type in the profile. The ASP.NET profile feature provides a generic storage system that allows you to define and maintain almost any kind of data while still making the data available in a type-safe manner.</p>
<pre class="code">Profile.PostalCode = txtPostalCode.Text</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>You must define the PostalCode property in the Web.config file by using the following markup:</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">profile</span><span style="color: blue">&gt;
    &lt;</span><span style="color: #a31515">properties</span><span style="color: blue">&gt;
      &lt;</span><span style="color: #a31515">add </span><span style="color: red">name</span><span style="color: blue">=</span>"<span style="color: blue">PostalCode</span>" <span style="color: blue">/&gt;
    &lt;/</span><span style="color: #a31515">properties</span><span style="color: blue">&gt;
  &lt;/</span><span style="color: #a31515">profile</span><span style="color: blue">&gt;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Application state, Session state, and profile properties all store data in memory on the server.</p>
<p>We will discuss each of the state management feature in more detail in upcoming articles. some of the definitions are taken from <a href="http://msdn.microsoft.com/" target="_blank">MSDN</a></p>
]]></content:encoded>
			<wfw:commentRss>http://allaboutasp.net/2009/04/aspnet-state-management-overview/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Silverlight Layout Container Panels &#8211; Dock Panel</title>
		<link>http://allaboutasp.net/2009/04/silverlight-layout-container-panels-dock-panel/</link>
		<comments>http://allaboutasp.net/2009/04/silverlight-layout-container-panels-dock-panel/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 02:45:13 +0000</pubDate>
		<dc:creator>Ajay Pathak</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[DockPanel]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight panel]]></category>

		<guid isPermaLink="false">http://allaboutasp.net/2009/04/silverlight-layout-container-panels-dock-panel/</guid>
		<description><![CDATA[Silverlight Dock Panel is one of the Silverlight Panel that enables layout. DockPanel is used to arrange a set of objects around the edges of panel. Dock Panel’s Dock property enables you to specify the location of objects inside Dock Panel. If you set the LastChildFill property to true (the default value) and the last [...]]]></description>
			<content:encoded><![CDATA[<p>Silverlight Dock Panel is one of the Silverlight Panel that enables layout. DockPanel is used to arrange a set of objects around the edges of panel. Dock Panel’s <font color="#800040" size="3" face="Calibri"><strong>Dock</strong></font> property enables you to specify the location of objects inside Dock Panel. If you set the <font color="#800040" size="3" face="Calibri"><strong>LastChildFill</strong></font> property to true (the default value) and the last element is allowed to resize, the last element added to the panel will resize to fill the remaining space. If the last element is set to a specific size, the last element will be set to the specified size and positioned in the middle of the remaining space. The order in which elements are added to the DockPanel is important.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="DockPanel" border="0" alt="DockPanel" src="http://allaboutasp.net/wp-content/images/SilverlightLayoutContainerPanelsDockPane_70A3/DockPanel.jpg" width="480" height="448" /> </p>
<h2>DockPanel Example</h2>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">Border </span><span style="color: red">BorderBrush</span><span style="color: blue">=&quot;Black&quot; </span><span style="color: red">BorderThickness</span><span style="color: blue">=&quot;3&quot; &gt;
            &lt;</span><span style="color: #a31515">StackPanel </span><span style="color: red">x</span><span style="color: blue">:</span><span style="color: red">Name</span><span style="color: blue">=&quot;LayoutRoot&quot; </span><span style="color: red">Background</span><span style="color: blue">=&quot;White&quot;&gt;
                &lt;</span><span style="color: #a31515">TextBlock </span><span style="color: red">Margin</span><span style="color: blue">=&quot;5&quot; </span><span style="color: red">Text</span><span style="color: blue">=&quot;Dock Panel&quot; /&gt;
                &lt;</span><span style="color: #a31515">Border </span><span style="color: red">BorderBrush</span><span style="color: blue">=&quot;Black&quot; </span><span style="color: red">BorderThickness</span><span style="color: blue">=&quot;3&quot; &gt;
                    &lt;</span><span style="color: #a31515">controls</span><span style="color: blue">:</span><span style="color: #a31515">DockPanel </span><span style="color: red">LastChildFill</span><span style="color: blue">=&quot;true&quot; </span><span style="color: red">Height</span><span style="color: blue">=&quot;265&quot;&gt;
                        &lt;</span><span style="color: #a31515">Button  </span><span style="color: red">Content</span><span style="color: blue">=&quot;Dock: Left&quot; </span><span style="color: red">controls</span><span style="color: blue">:</span><span style="color: red">DockPanel.Dock </span><span style="color: blue">=&quot;Left&quot; /&gt;
                        &lt;</span><span style="color: #a31515">Button </span><span style="color: red">Content</span><span style="color: blue">=&quot;Dock: Right&quot; </span><span style="color: red">controls</span><span style="color: blue">:</span><span style="color: red">DockPanel.Dock </span><span style="color: blue">=&quot;Right&quot; /&gt;
                        &lt;</span><span style="color: #a31515">Button  </span><span style="color: red">Content</span><span style="color: blue">=&quot;Dock: Top&quot; </span><span style="color: red">controls</span><span style="color: blue">:</span><span style="color: red">DockPanel.Dock </span><span style="color: blue">=&quot;Top&quot; /&gt;
                        &lt;</span><span style="color: #a31515">Button  </span><span style="color: red">Content</span><span style="color: blue">=&quot;Dock: Bottom&quot; </span><span style="color: red">controls</span><span style="color: blue">:</span><span style="color: red">DockPanel.Dock </span><span style="color: blue">=&quot;Bottom&quot; /&gt;
                        &lt;</span><span style="color: #a31515">Button </span><span style="color: red">Content</span><span style="color: blue">=&quot;Last Child&quot; /&gt;
                    &lt;/</span><span style="color: #a31515">controls</span><span style="color: blue">:</span><span style="color: #a31515">DockPanel</span><span style="color: blue">&gt;
                &lt;/</span><span style="color: #a31515">Border</span><span style="color: blue">&gt;
            &lt;/</span><span style="color: #a31515">StackPanel</span><span style="color: blue">&gt;
        &lt;/</span><span style="color: #a31515">Border</span><span style="color: blue">&gt;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>In Next we will discuss about Dock Panel Grid</p>
]]></content:encoded>
			<wfw:commentRss>http://allaboutasp.net/2009/04/silverlight-layout-container-panels-dock-panel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ASP.NET State Management</title>
		<link>http://allaboutasp.net/2009/04/aspnet-state-management/</link>
		<comments>http://allaboutasp.net/2009/04/aspnet-state-management/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 02:38:35 +0000</pubDate>
		<dc:creator>Ajay Pathak</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[state management]]></category>

		<guid isPermaLink="false">http://allaboutasp.net/2009/04/aspnet-state-management/</guid>
		<description><![CDATA[As we all know that HTTP is a stateless protocol means when after each request client is disconnected from server and ASP.net discards objects that were created for the page. Drawback of this architecture is that you have to store the information between the server request while on the other side this architecture enable web [...]]]></description>
			<content:encoded><![CDATA[<p>As we all know that HTTP is a stateless protocol means when after each request client is disconnected from server and ASP.net discards objects that were created for the page. Drawback of this architecture is that you have to store the information between the server request while on the other side this architecture enable web applications to scale up and servers can responds to thousands of simultaneous requests without running out of server<br />
memory.</p>
<p>ASP.net includes a variety of state management options. A developer can choose right option for state management option depending upon data you need to store, duration for which data has to be stored, data scope and security and performance considerations.</p>
<p>There are three options available for state management in ASP.net</p>
<ul>
<li>View State</li>
<li>Query String</li>
<li>Custom Cookies</li>
<li>Caching</li>
<li>Profiles</li>
</ul>
<p>In addition to this you can also write a custom state management module for your application and use database or file system for storing state information but this will bring some performance issues to your application because for retrieving and storing state information you need to establish database connections. </p>
<p>we will discuss asp.net management options in more details in upcoming posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://allaboutasp.net/2009/04/aspnet-state-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retrieving Page Controls Programmatically</title>
		<link>http://allaboutasp.net/2009/03/retrieving-page-controls-programmatically/</link>
		<comments>http://allaboutasp.net/2009/03/retrieving-page-controls-programmatically/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 02:55:01 +0000</pubDate>
		<dc:creator>Ajay Pathak</dc:creator>
				<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[Control Tree]]></category>
		<category><![CDATA[Controls]]></category>
		<category><![CDATA[Page]]></category>

		<guid isPermaLink="false">http://allaboutasp.net/2009/03/retrieving-page-controls-programmatically/</guid>
		<description><![CDATA[There might be situations where you want to retrieve controls that are present in a web page and process them. In that case this article can be very use. Basically a web page is a container for all controls and for retrieving all controls we need to traverse the control tree. So for this this [...]]]></description>
			<content:encoded><![CDATA[<p>There might be situations where you want to retrieve controls that are present in a web page and process them. In that case this article can be very use. Basically a web page is a container for all controls and for retrieving all controls we need to traverse the control tree. So for this this program can be used to disable all form controls at runtime</p>
<pre class="code"><span style="color: blue">Partial Class </span>_Default
    <span style="color: blue">Inherits </span>System.Web.UI.Page

    <span style="color: blue">Protected Sub </span>Page_Load(<span style="color: blue">ByVal </span>sender <span style="color: blue">As Object</span>, <span style="color: blue">ByVal </span>e <span style="color: blue">As </span>System.EventArgs) <span style="color: blue">Handles Me</span>.Load
        disableControls(<span style="color: blue">Me</span>.Page)

    <span style="color: blue">End Sub
    Public Sub </span>disableControls(<span style="color: blue">ByVal </span>controltree <span style="color: blue">As </span>Control)
        <span style="color: blue">For Each </span>tempcontrol <span style="color: blue">As </span>Control <span style="color: blue">In </span>controltree.Controls
            <span style="color: blue">If TypeOf </span>tempcontrol <span style="color: blue">Is </span>TextBox <span style="color: blue">Then
                CType</span>(tempcontrol, TextBox).Enabled = <span style="color: blue">False
                Continue For
            ElseIf TypeOf </span>tempcontrol <span style="color: blue">Is </span>Label <span style="color: blue">Then
                CType</span>(tempcontrol, Label).Enabled = <span style="color: blue">False
                Continue For
            ElseIf TypeOf </span>tempcontrol <span style="color: blue">Is </span>Button <span style="color: blue">Then
                CType</span>(tempcontrol, Button).Enabled = <span style="color: blue">False
                Continue For
            ElseIf </span>tempcontrol.Controls.Count &gt; 0 <span style="color: blue">Then
                </span>disableControls(tempcontrol)
            <span style="color: blue">End If
        Next
    End Sub
End Class
</span></pre>
<p>Before using this code there are some performance issues</p>
<ul>
<li>If you are calling this function from different pages and then storing the state of page is very useful for example if you already disabled all the controls then there is no need to pass the page control to this method This can be easily done with storing the page state in session variable. </li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://allaboutasp.net/2009/03/retrieving-page-controls-programmatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

