<?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-3751833191140261729</id><updated>2024-09-19T22:28:00.281+05:30</updated><category term="asp.net 2.0"/><category term="javascript"/><category term="CSS"/><category term="Facebook Textbox clone"/><category term="JQuery"/><category term="SQL Server"/><category term="State management"/><category term="VB.net"/><category term="asp.net"/><category term="custom validator"/><title type='text'>Web Development Resources for Asp.net 2.0/3,5, Jquery, SQL Server Developers - By Brijendra Tiwari</title><subtitle type='html'>This is place where i am actualy sharing my experience of working on asp.net from past 6 years. The difficulties which i have faced and other developers use to.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tbrij.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://tbrij.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Brijendra Tiwari</name><uri>http://www.blogger.com/profile/08291914456961580595</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3751833191140261729.post-6818157095583708189</id><published>2012-08-16T21:59:00.001+05:30</published><updated>2012-08-19T22:25:39.320+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="State management"/><title type='text'>State Management techniques 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 style=&quot;background-color: white; font-family: inherit;&quot;&gt;Web form pages are HTTP-Based, they are stateless, which means they don’t know whether the requests are all from the same client, and pages are destroyed and recreated with each round trip to the server, therefore information will be lost, therefore state management is really an issue in developing web applications&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;We could easily solve these problems in ASP with cookie, query string, application, session and so on. Now in ASP.NET, we still can use these functions, but they are richer and more powerful, so let’s dive into it.&lt;br /&gt;&lt;br /&gt;Mainly there are two different ways to manage web page’s state: Client-side and Server-side.&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;b&gt;1.Client-side state management :&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin-bottom: 12pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;There is no information maintained on the server between round trips. Information will be stored in the page or on the client’s computer.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A. Cookies.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;A cookie is a small amount of data stored either in a text file on the client&#39;s file system or in-memory in the client browser session. Cookies are mainly used for tracking data settings. Let’s take an example: say we want to customize a welcome web page, when the user request the default web page, the application first to detect if the user has logined before, we can retrieve the user informatin from cookies:&lt;br /&gt;[c#]&lt;br /&gt;if (Request.Cookies[“username”]!=null)&lt;br /&gt;lbMessage.text=”Dear “+Request.Cookies[“username”].Value+”, Welcome shopping here!”;&lt;br /&gt;else&lt;br /&gt;lbMessage.text=”Welcome shopping here!”;&lt;br /&gt;&lt;br /&gt;If you want to store client’s information, you can use the following code:&lt;br /&gt;[c#]&lt;br /&gt;Response.Cookies[“username’].Value=username;&lt;br /&gt;&lt;br /&gt;So next time when the user request the web page, you can easily recongnize the user again.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3751833191140261729&quot; name=&quot;Heading27&quot; style=&quot;color: #004cd5;&quot;&gt;&lt;/a&gt;&lt;b&gt;B. Hidden Field&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 12pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;A hidden field does not render visibly in the browser, but you can set its properties just as you can with a standard control. 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 would like to store directly in the page. Hidden field stores a single variable in its&amp;nbsp;&lt;b&gt;value&lt;/b&gt;&amp;nbsp;property and must be explicitly added it to the page.&lt;br /&gt;ASP.NET provides the&amp;nbsp;&lt;b&gt;HtmlInputHidden&amp;nbsp;&lt;/b&gt;control that offers hidden field functionality.&lt;br /&gt;[c#]&lt;br /&gt;protected System.Web.UI.HtmlControls.HtmlInputHidden Hidden1;&lt;br /&gt;//to assign a value to Hidden field&lt;br /&gt;Hidden1.Value=”this is a test”;&lt;br /&gt;//to retrieve a value&lt;br /&gt;string str=Hidden1.Value;&lt;br /&gt;&lt;br /&gt;Note: Keep in mind, in order to use hidden field, you have to use HTTP-Post method to post web page. Although its name is ‘Hidden’, its value is not hidden, you can see its value through ‘view source’ function.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3751833191140261729&quot; name=&quot;Heading39&quot; style=&quot;color: #004cd5;&quot;&gt;&lt;/a&gt;&lt;b&gt;C.&amp;nbsp;&lt;st1:place w:st=&quot;on&quot;&gt;&lt;st1:placename w:st=&quot;on&quot;&gt;View&lt;/st1:placename&gt;&amp;nbsp;&lt;st1:placetype w:st=&quot;on&quot;&gt;State&lt;/st1:placetype&gt;&lt;/st1:place&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 12pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;Each control on a Web Forms page, including the page itself, has a&amp;nbsp;&lt;b&gt;ViewState&lt;/b&gt;&amp;nbsp;property, it is a built-in struture for automatic retention of page and control state, which means you don’t need to do anything about getting back the data of controls after posting page to the server.&lt;br /&gt;&lt;br /&gt;Here, which is useful to us is the ViewState property, we can use it to save information between round trips to the server.&lt;br /&gt;[c#]&lt;br /&gt;//to save information&lt;br /&gt;ViewState.Add(“shape”,”circle”);&lt;br /&gt;//to retrieve information&lt;br /&gt;string shapes=ViewState[“shape”];&lt;br /&gt;&lt;br /&gt;Note: Unlike Hidden Field, the values in ViewState are invisible when ‘view source’, they are compressed and encoded.&lt;br /&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3751833191140261729&quot; name=&quot;Heading53&quot; style=&quot;color: #004cd5;&quot;&gt;&lt;/a&gt;&lt;b&gt;D. Query Strings&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Query strings provide a simple but limited way of maintaining some state information.You can easily pass information from one page to another, But most browsers and client devices impose a 255-character limit on the length of the URL. In addition, the query values are exposed to the Internet via the URL so in some cases security may be an issue.&lt;br /&gt;A URL with query strings may look like this:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.examples.com/list.aspx?categoryid=1&amp;amp;productid=101&quot; style=&quot;color: purple; text-decoration: none;&quot;&gt;&lt;u&gt;http://www.examples.com/list.aspx?categoryid=1&amp;amp;productid=101&lt;/u&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When list.aspx is being requested, the category and product information can be obtained by using the following codes:&lt;br /&gt;[c#]&lt;br /&gt;string categoryid, productid;&lt;br /&gt;categoryid=Request.Params[“categoryid”];&lt;br /&gt;productid=Request.Params[“productid”];&lt;br /&gt;&lt;br /&gt;Note: you can only use HTTP-Get method to post the web page, or you will never get the value from query strings.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Server-side state management:&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin-bottom: 12pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Information will be stored on the server, it has higher security but it can use more web server resources.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;A. Aplication object&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The&amp;nbsp;&lt;b&gt;Application&lt;/b&gt;&amp;nbsp;object provides a mechanism for storing data that is accessible to all code running within the Web application, The ideal data to insert into application state variables is data that is shared by multiple sessions and does not change often.. And just because it is visible to the entire application, you need to used Lock and UnLock pair to avoid having conflit value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;[c#]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Application.Lock();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Application[“mydata”]=”mydata”;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 12pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Application.UnLock();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3751833191140261729&quot; name=&quot;Heading77&quot; style=&quot;color: #004cd5;&quot;&gt;&lt;/a&gt;&lt;b&gt;B. Session object&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 12pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;b&gt;Session&lt;/b&gt;&amp;nbsp;object can be used for storing session-specific information that needs to be maintained between server round trips and between requests for pages. Session object is per-client basis, which means different clients generate different session object.The ideal data to store in session-state variables is short-lived, sensitive data that is specific to an individual session.&lt;br /&gt;&lt;br /&gt;Each active ASP.NET session is identified and tracked using a 120-bit&amp;nbsp;&lt;b&gt;SessionID&lt;/b&gt;&amp;nbsp;string containing URL-legal ASCII characters.&lt;b&gt;&amp;nbsp;SessionID&lt;/b&gt;&amp;nbsp;values are generated using an algorithm that guarantees uniqueness so that sessions do not collide, and SessionID’s randomness makes it harder to guess the session ID of an existing session.&lt;br /&gt;&lt;b&gt;SessionIDs&lt;/b&gt;&amp;nbsp;are communicated across client-server requests either by an HTTP cookie or a modified URL, depending on how you set the application&#39;s configuration settings. So how to set the session setting in application configuration? Ok, let’s go further to look at it.&lt;br /&gt;&lt;br /&gt;Every web application must have a configuration file named web.config, it is a XML-Based file, there is a section name ‘&lt;b&gt;sessionState&lt;/b&gt;’, the following is an example:&lt;br /&gt;&lt;br /&gt;&lt;sessionstate cookieless=&quot;false&quot; mode=&quot;InProc&quot; sqlconnectionstring=&quot;data source=127.0.0.1;user id=sa;password=&quot; stateconnectionstring=&quot;tcpip=127.0.0.1:42424&quot; timeout=&quot;20&quot;&gt;‘cookieless’ option can be ‘true’ or ‘false’. When it is ‘false’(default value), ASP.NET will use HTTP cookie to identify users. When it is ‘true’, ASP.NET will randomly generate a unique number and put it just right ahead of the requested file, this number is used to identify users, you can see it on the address bar of IE:&lt;br /&gt;&lt;br /&gt;Ok, it is further enough, let is go back to session object.&lt;br /&gt;[c#]&lt;br /&gt;//to store information&lt;br /&gt;Session[“myname”]=”Mike”;&lt;br /&gt;//to retrieve information&lt;br /&gt;myname=Session[“myname”];&lt;o:p&gt;&lt;/o:p&gt;&lt;/sessionstate&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=3751833191140261729&quot; name=&quot;Heading99&quot; style=&quot;color: #004cd5;&quot;&gt;&lt;/a&gt;&lt;b&gt;C. Database&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; margin: 0in 0in 12pt;&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: xx-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit; font-size: xx-small;&quot;&gt;Database enables you to store large amount of information pertaining to state in your Web application. Sometimes users continually query the database by using the unique ID, you can save it in the database for use across multiple request for the pages in your site.&lt;/span&gt;&lt;span style=&quot;font-family: Verdana; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tbrij.blogspot.com/feeds/6818157095583708189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tbrij.blogspot.com/2012/08/state-management-techniques-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/6818157095583708189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/6818157095583708189'/><link rel='alternate' type='text/html' href='http://tbrij.blogspot.com/2012/08/state-management-techniques-in-aspnet.html' title='State Management techniques in asp.net'/><author><name>Brijendra Tiwari</name><uri>http://www.blogger.com/profile/08291914456961580595</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3751833191140261729.post-8076856351781041636</id><published>2012-08-16T21:57:00.001+05:30</published><updated>2012-08-19T22:56:45.112+05:30</updated><title type='text'>Performance guidelines for a asp.net Web application</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;
When you design and develop your web applications, you always must take into consideration the performance factor. By doing this, you will remove the cost of rewriting modules, modifying code, or redistributing applications. A good practice that must be kept in mind for writing quality code is to make frequent code reviews. For example, I often find a better implementation of a certain module after a code review. Also, you should test different ways of implementing your code to determine the performance impact over your application. Here are some rules that should be followed for writing high performing applications.&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white;&quot;&gt;
&lt;span style=&quot;color: #073763; font-family: inherit; &quot;&gt;The rules&lt;/span&gt;&lt;/h2&gt;
&lt;ol style=&quot;background-color: white;&quot;&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; &quot;&gt;Store your content by using caching&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;As you know, ASP.NET allows you to cache entire pages, fragments of pages, or controls. You can also cache variable data by specifying the parameters that the data depends on. By using caching, you help the ASP.NET engine to return data for repeated requests for the same page much faster. There is one catch here: caching consumes server memory, so it&#39;s not recommended to be used when you need to get updated data on your page.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Avoid session state&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Whether you store your data in in-process or on a state server or in a SQL database, session state requires memory, and it&#39;s also time consuming when you store or retrieve data from it. If you do not want to use session state, disable it on your web form using the&amp;nbsp;&lt;code lang=&quot;Aspnet&quot; style=&quot;color: #990000;&quot;&gt;&amp;lt;@%Page EnableSessionState=&quot;false&quot;%&amp;gt;&lt;/code&gt;&amp;nbsp;directive. In case you use session state only to retrieve data from it and not to update it, make the session state read only by using the&amp;nbsp;&lt;code lang=&quot;Aspnet&quot; style=&quot;color: #990000;&quot;&gt;&amp;lt;@%Page EnableSessionState =&quot;ReadOnly&quot;%&amp;gt;&lt;/code&gt;&amp;nbsp;directive.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Avoid ViewState&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;ViewState allows you to keep the content of a control across trips to the server. This comes with a cost, a greater amount of data is sent from the server to the client end vice versa, so speed and network bandwidth can be affected. You can avoid this drawback by setting the&amp;nbsp;&lt;code style=&quot;color: #990000;&quot;&gt;EnableViewState&lt;/code&gt;&amp;nbsp;property of your web controls to false, when you don&#39;t need them to keep their state across server trips.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Use low cost authentication&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Authentication can also have an impact over the performance of your application. For example, passport authentication is slower than form-based authentication, which in turn is slower than Windows authentication.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Use the Server.Transfer() method for server-side page redirection&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;It is better to use the&amp;nbsp;&lt;code style=&quot;color: #990000;&quot;&gt;Server.Transfer()&lt;/code&gt;&amp;nbsp;method for server-side ASPX page redirection in the same application than the&amp;nbsp;&lt;code style=&quot;color: #990000;&quot;&gt;Response.Redirect()&lt;/code&gt;&amp;nbsp;method. This will reduce the extra roundtrip required by the second method (&lt;code style=&quot;color: #990000;&quot;&gt;Response.Redirect()&lt;/code&gt;) to perform client-side redirection.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;The number of web server controls&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;The use of web server controls increases the response time of your application because they need time to be processed on the server side before they are rendered on the client side. Therefore, take into consideration the usage of HTML elements where they are suited, for example, if you want to display static text.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Avoid frequent usage of boxing and unboxing&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;When a value type such as a structure is copied to a reference type such as a class, the compiler creates an object on the heap and copies the value of the value type from the stack to this newly created object on the heap. This process is called boxing, and requires more overhead than just a simple copy from a value type to value type. When you copy a reference type to a value type, the value of the object from the heap is copied to the value type from the stack. This process is called unboxing. You should take into consideration the overhead of these processes when you design your application.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Avoid using strings for complex string operations&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;The&amp;nbsp;&lt;code style=&quot;color: #990000;&quot;&gt;String&lt;/code&gt;&amp;nbsp;type is immutable; this means that after a string is created, it can&#39;t be modified. When you modify a string, the CLR creates a new one based on your modifications and returns it. The old string remains in memory until the garbage collector cleans it. If your application needs to extensively modifying strings, then use the&amp;nbsp;&lt;code style=&quot;color: #990000;&quot;&gt;StringBuilder&lt;/code&gt;&amp;nbsp;class. This class stores the string as an array of characters. The&amp;nbsp;&lt;code style=&quot;color: #990000;&quot;&gt;StringBuilder&lt;/code&gt;&amp;nbsp;object is mutable, and does in-place modifications of strings.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Use the AddRange() method with collections&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;There is a large number of collection classes that expose the&amp;nbsp;&lt;code style=&quot;color: #990000;&quot;&gt;AddRange()&lt;/code&gt;&amp;nbsp;method, which you can use to add an array of items to the collection instead of repeatedly calling the&amp;nbsp;&lt;code style=&quot;color: #990000;&quot;&gt;Add()&lt;/code&gt;&amp;nbsp;method inside a loop.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Avoid throwing exceptions&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Throwing exceptions is a costly operation. You should be very careful when you throw exceptions from your application. Exceptions should be thrown only to signify an exceptional error case. You should never throw exceptions just for managing your application flow.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Avoid using unmanaged code&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Calls to unmanaged code are a costly marshaling operation. Try to reduce the number of calls between managed and unmanaged code. Consider doing more work in each call rather than making frequent calls to do small tasks.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Avoid making frequent calls across processes&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Working with distributed applications involves additional overhead negotiating network and application level protocols. In this case, network speed can also be a bottleneck. Try to do as much work as possible in fewer calls over the network.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Make use of optimized managed providers&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;As you know, OLEDB is a generic provider which offers access to data exposed by any OLEDB provider. Managed providers are specifically optimized for some databases. For example, when you use OLEDB to connect to a SQL Server database, OLEDB first passes your request to OLE DB COM components, which in turn translate the request to the SQL Native Tabular Data Stream (TDS) format. If you use SqlClient, it will directly construct the TDS packets and communicate with SQL Server. The removal of extra translation will significantly improve the performance of your application.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Use Stored Procedure and not SQL statements&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;When you are working with an RDBMS as SQL Server, you should use Stored Procedures rather than SQL statements given as a text command, because Stored Procedures are highly optimized for server side data access.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Use a DataReader instead of a DataSet for forward-only sequential access&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;If you are reading a table sequentially, you should use the&amp;nbsp;&lt;code style=&quot;color: #990000;&quot;&gt;DataReader&lt;/code&gt;&amp;nbsp;rather than the&amp;nbsp;&lt;code style=&quot;color: #990000;&quot;&gt;DataSet&lt;/code&gt;. A&lt;code style=&quot;color: #990000;&quot;&gt;DataReader&lt;/code&gt;&amp;nbsp;object creates a read only stream of data that will increase your application performance because only one row is in memory at a time.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Use connection pooling&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;The slowest operation performed in a database application scenario is establishing a connection with a database. The SQL Server .NET Data Provider offers connection pooling to improve performance when connecting to a SQL Server database. In connection pooling, old connection information is stored in a connection pool so it can be reused for the next connection. If you are using dynamic connection strings, you will disallow the connection pooling mechanism because connections are only pooled on the exact connection string.&lt;/span&gt;&lt;/div&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Use transactions&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Distributed transactions might add performance overhead to your application, so you should use them only when required and keep their life as short as possible.&lt;/span&gt;&lt;/div&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tbrij.blogspot.com/feeds/8076856351781041636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tbrij.blogspot.com/2012/08/performance-guidelines-for-aspnet-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/8076856351781041636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/8076856351781041636'/><link rel='alternate' type='text/html' href='http://tbrij.blogspot.com/2012/08/performance-guidelines-for-aspnet-web.html' title='Performance guidelines for a asp.net Web application'/><author><name>Brijendra Tiwari</name><uri>http://www.blogger.com/profile/08291914456961580595</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3751833191140261729.post-6309189284158437632</id><published>2011-09-13T20:16:00.000+05:30</published><updated>2012-08-19T22:20:23.937+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net 2.0"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Display hierarchial data using TreeView :: Parent-Child Relationship</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Treeview is a control available in ASP.NET to show hierarchial data. Using features of treeview and power of dataset, we can design a tree wrt datatable with parent-child relationship. This post explains the implementation of hierarchial data into treeview.&lt;br /&gt;
This figure illustrate the outcome and datatable strucuture to which tree should be mapped.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr9GKyQVQj6CltDwJZioYuAvcvkhbZeeqwDAsDeTRm4dCZr4wkecSiMOkxfSX1Ei5E-aZM8NdPLeoTLVs6IqG2OpylJjaBOFbVZIqabpiLWVOFQw3Tkb7WAepuOlaE-iWM_f-r-YmA842Z/s1600/scr1.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr9GKyQVQj6CltDwJZioYuAvcvkhbZeeqwDAsDeTRm4dCZr4wkecSiMOkxfSX1Ei5E-aZM8NdPLeoTLVs6IqG2OpylJjaBOFbVZIqabpiLWVOFQw3Tkb7WAepuOlaE-iWM_f-r-YmA842Z/s400/scr1.gif&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;codeContainer&quot;&gt;
&lt;span class=&quot;codeTop&quot;&gt;C# : Server Side Code&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:c#&quot;&gt;    public void bindDataToTree(DataSet __dsData)
    {
        treeViewCategories.Nodes.Clear();
        __dsData.Relations.Add(&quot;NodeRelation&quot;, __dsData.Tables[0].Columns[&quot;Category_Id&quot;], __dsData.Tables[0].Columns[&quot;Parent_Id&quot;]);
        foreach (DataRow dr in __dsData.Tables[0].Rows)
        {
            if (dr.IsNull(&quot;Parent_Id&quot;))
            {
                TreeNode newNode = CreateNode(dr[&quot;Category_Name&quot;].ToString(), dr[&quot;Category_Id&quot;].ToString(), true);
                treeViewCategories.Nodes.Add(newNode);
                PopulateSubTree(dr, newNode);
            }
        }
    }

    private TreeNode CreateNode(string text, string value, bool expanded)
    {
        TreeNode node = new TreeNode();
        node.Text = text;
        node.Value = value;
        node.Expanded = expanded;
        return node;
    }

    private void PopulateSubTree(DataRow dbRow, TreeNode node)
    {
        foreach (DataRow childRow in dbRow.GetChildRows(&quot;NodeRelation&quot;))
        {
            TreeNode childNode = CreateNode(childRow[&quot;Category_Name&quot;].ToString(), childRow[&quot;Category_Id&quot;].ToString(), true);
            node.ChildNodes.Add(childNode);
            PopulateSubTree(childRow, childNode);
        }
    }
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codeContainer&quot;&gt;
&lt;span class=&quot;codeTop&quot;&gt;CSS Style&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:css&quot;&gt;    body{ font:normal 10pt arial;}
    a{ color:#006699;}
    .tvHoverStyle{ text-decoration:underline;}
    .tvRootNode{ font-weight:bold; color:#000; font-size:1.1em;}
    .tvParentNode{ font-weight:bold;}
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codeContainer&quot;&gt;
&lt;span class=&quot;codeTop&quot;&gt;ASPX page&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;    &lt;asp:treeview id=&quot;treeViewCategories&quot; runat=&quot;server&quot; showlines=&quot;true&quot;&gt;
        &lt;rootnodestyle cssclass=&quot;tvRootNode&quot;&gt;
        &lt;parentnodestyle cssclass=&quot;tvParentNode&quot;&gt;
        &lt;hovernodestyle cssclass=&quot;tvHoverStyle&quot;&gt;
    &lt;/hovernodestyle&gt;&lt;/parentnodestyle&gt;&lt;/rootnodestyle&gt;&lt;/asp:treeview&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tbrij.blogspot.com/feeds/6309189284158437632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tbrij.blogspot.com/2011/09/display-hierarchial-data-using-treeview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/6309189284158437632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/6309189284158437632'/><link rel='alternate' type='text/html' href='http://tbrij.blogspot.com/2011/09/display-hierarchial-data-using-treeview.html' title='Display hierarchial data using TreeView :: Parent-Child Relationship'/><author><name>Brijendra Tiwari</name><uri>http://www.blogger.com/profile/08291914456961580595</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjr9GKyQVQj6CltDwJZioYuAvcvkhbZeeqwDAsDeTRm4dCZr4wkecSiMOkxfSX1Ei5E-aZM8NdPLeoTLVs6IqG2OpylJjaBOFbVZIqabpiLWVOFQw3Tkb7WAepuOlaE-iWM_f-r-YmA842Z/s72-c/scr1.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3751833191140261729.post-7163352243553616905</id><published>2011-09-13T18:13:00.001+05:30</published><updated>2012-08-19T22:20:56.123+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Facebook Textbox clone"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><title type='text'>Autocomplete TextBox with selection :: Facebook Clone</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmLx8RaCfUyEbeIQYUMpOeJz22coRjSUU_eA7mNexV-mfQc6XDPyJ2uhPG20LYh1eNZj3CHNw2Jd694er1RkU3ogA1Ffn-bDQAuFj6J0lDI-6eqaQ36XYJciPFrxRdxg4sOsC1Fnmq5L9e/s1600/screenshot.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmLx8RaCfUyEbeIQYUMpOeJz22coRjSUU_eA7mNexV-mfQc6XDPyJ2uhPG20LYh1eNZj3CHNw2Jd694er1RkU3ogA1Ffn-bDQAuFj6J0lDI-6eqaQ36XYJciPFrxRdxg4sOsC1Fnmq5L9e/s400/screenshot.gif&quot; width=&quot;500&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;br /&gt;
One day i was actually thinking about implementation of auto complete text box in facebook. Then i received a email request from one my friend about same asking me how to implement Facebook like expanding textbox with Jquery. Then i started working and sample post for implementation logic.
&lt;br /&gt;
&lt;div class=&quot;codeContainer&quot;&gt;
&lt;span class=&quot;codeTop&quot;&gt;C# : Server Side Code&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:c#&quot;&gt;    [WebMethod]
    public static string getTableData(string Keyword)
    {
        StringBuilder sb = new StringBuilder();
        if (!string.IsNullOrEmpty(Keyword))
        {
            DataTable dt = createDataSource();
            DataView dv = dt.DefaultView;
            dv.RowFilter = string.Format(&quot;{0} like &#39;%{1}%&#39;&quot;, &quot;name&quot;, Keyword);
            dv.Sort = &quot;name asc&quot;;
            foreach (DataRowView dr in dv)
            {
                sb.Append(&quot;&lt;a href=&quot;javascript:void(0)&quot;&gt;&quot;);
                sb.Append(&quot;&quot;);
                sb.Append(string.Format(&quot;&quot;, dr[&quot;image&quot;].ToString()));
                sb.Append(string.Format(&quot;&quot;, dr[&quot;name&quot;].ToString()));
                sb.Append(&quot;&quot;);
                sb.Append(string.Format(&quot;&quot;, dr[&quot;location&quot;].ToString()));
                sb.Append(&quot;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td rowspan=&quot;2&quot;&gt;&lt;img height=&quot;28px&quot; src=&quot;{0}&quot; width=&quot;28px&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;&amp;nbsp;{0}&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&amp;nbsp;{0}&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/a&gt;&quot;);
            }
        }
        return sb.ToString();
    }
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codeContainer&quot;&gt;
&lt;span class=&quot;codeTop&quot;&gt;CSS Style&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:css&quot;&gt;        body{ font:normal 8pt tahoma;}
        #wrap{ width:900px; margin:40px auto 0 auto;}
        #loading
        {
            background:url(&#39;loading.gif&#39;) no-repeat left top;
            width:18px; height:16px; position:absolute; display:none;
        }
        #autoCompleteBox{border:1px solid #6b86b5; width:300px;}
        #autoCompleteBox span
        { 
            float:left; display:block; 
            background-color:#e7e7f7; 
            border:1px solid #9caece; 
            padding:2px; 
            margin:3px;
        }
        #autoCompleteBox input[type=&quot;text&quot;]
        { 
            border:none; width:100px;
            padding:5px; 
            font:normal 8pt tahoma,arial;
        }
        #autoCompleteList
        { 
            width:300px; display:none; 
            padding:3px; position:absolute; top:65px; 
            border:1px solid #313031; 
            border-bottom:2px solid #293c6b; 
            background-color:#fff;
        }
        #autoCompleteList a{ display:block; margin-bottom:5px; text-decoration:none;}
        #autoCompleteList a:hover{ background-color:#6b86b5;}  
        #autoCompleteList a:hover table td{ color:#fff;}
        #autoCompleteList a:hover table td b{ color:#fff;}
        #autoCompleteList table
        {
            font-size:8.5pt; 
            border-collapse:collapse;
        }
        #autoCompleteList td
        { 
            vertical-align:top; 
            line-height:8pt; color:#666;
        }
        #autoCompleteList td b{ color:#000;}
        #autoCompleteList img{ border:none;}
    &lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codeContainer&quot;&gt;
&lt;span class=&quot;codeTop&quot;&gt;ASPX page&lt;/span&gt;
    &lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;        &lt;div id=&quot;autoCompleteBox&quot;&gt;
&lt;input id=&quot;tbxDisplayName&quot; type=&quot;text&quot; /&gt;
        &lt;/div&gt;
&lt;div id=&quot;loading&quot;&gt;
&lt;/div&gt;
&lt;div id=&quot;autoCompleteList&quot;&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;codeContainer&quot;&gt;
&lt;span class=&quot;codeTop&quot;&gt;JQuery Code&lt;/span&gt;
    &lt;br /&gt;
&lt;pre class=&quot;brush:js&quot;&gt;$(document).ready(function(e) 
        {
            $(&#39;#autoCompleteBox&#39;).bind(&quot;click&quot;,function(clickEvt){
                $(this).find(&quot;input&quot;).focus();
            });
            /*set loader position*/
            var boxOffsets = $(&#39;#autoCompleteBox&#39;).offset();
            var boxWidth=$(&#39;#autoCompleteBox&#39;).width();
            $(&#39;#loading&#39;).css(&quot;left&quot;, boxOffsets.left + boxWidth-18);
            $(&#39;#loading&#39;).css(&quot;top&quot;, boxOffsets.top + 5);
            $(&quot;#autoCompleteBox&quot;).find(&quot;input&quot;).bind(&quot;keyup&quot;, function(evt) {
                $(this).attr(&quot;id&quot;,&quot;controlId&quot;+Math.random()); // To stop autocomplete of browser, chnage text box id randomly
                var keyword = $(this).val();
                keyword = keyword.trim();
                if (keyword != &quot; &quot;) {
                    $(&#39;#autoCompleteBox&#39;).ajaxStart(function() {
                        $(&#39;#loading&#39;).show();
                    });

                    $.ajax({
                        type: &quot;POST&quot;,
                        url: window.location.pathname+ &quot;/getTableData&quot;,
                        dataType: &quot;json&quot;,
                        data: &quot;{&#39;Keyword&#39;:&#39;&quot; + keyword + &quot;&#39;}&quot;,
                        contentType: &quot;application/json; charset=utf-8&quot;,
                        success: function(msg) {
                            $(&quot;#autoCompleteList&quot;).html(msg.d);
                            var listOffsets=$(&quot;#autoCompleteBox&quot;).offset();
                            var listHeight=$(&quot;#autoCompleteBox&quot;).height();
                            $(&quot;#autoCompleteList&quot;).css(&quot;top&quot;,listOffsets.top+listHeight+2);
                            /*remove duplicate value from list, which is already selected*/
                            $.each($(&quot;#autoCompleteBox&quot;).find(&quot;span&quot;), function(index, value) {
                                var _currentValue = $(this).text().replace($(this).find(&#39;a&#39;).text(),&#39;&#39;);
                                $.each($(&#39;#autoCompleteList table&#39;).find(&quot;td:eq(1)&quot;), function(anchorIndex) {
                                    if ($(this).text().indexOf(_currentValue) &amp;gt;= 0) {
                                        $(&#39;#autoCompleteList a&#39;).eq(anchorIndex).remove();
                                    }
                                });
                            });

                            $(&#39;#loading&#39;).hide();
                            if ($(&quot;#autoCompleteList&quot;).html() != &quot;&quot;) {
                                $(&quot;#autoCompleteList&quot;).show();
                            }
                            else { $(&quot;#autoCompleteList&quot;).hide(); }
                            
                            /*Bind click on autocomplete list items*/
                            $(&quot;#autoCompleteList&quot;).find(&quot;a&quot;).bind(&quot;click&quot;, function(aclick) {
                                var _uname = $(this).find(&quot;td:eq(1)&quot;).text();
                                _uname = &quot;&quot; + _uname + &quot;&lt;a href=&quot;javascript:void(0)&quot; onclick=&quot;closeThis(this);&quot;&gt;X&lt;/a&gt;&quot;;
                                $(&#39;#autoCompleteBox&#39;).prepend(_uname);
                                $(&quot;#autoCompleteList&quot;).hide();
                                $(&quot;#autoCompleteBox&quot;).find(&quot;input&quot;).val(&quot;&quot;);
                                $(&quot;#autoCompleteBox&quot;).find(&quot;input&quot;).focus();
                                $()
                            });
                        },
                        error: function(eMSG) {
                            alert(eMSG.status);
                        }
                    });
                }
            });
        });
        function closeThis(spanObj)
        {
           $(spanObj).parent().remove();
           $(&quot;#autoCompleteBox&quot;).find(&quot;input&quot;).focus();
        }
    &lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tbrij.blogspot.com/feeds/7163352243553616905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tbrij.blogspot.com/2011/09/autocomplete-textbox-with-selection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/7163352243553616905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/7163352243553616905'/><link rel='alternate' type='text/html' href='http://tbrij.blogspot.com/2011/09/autocomplete-textbox-with-selection.html' title='Autocomplete TextBox with selection :: Facebook Clone'/><author><name>Brijendra Tiwari</name><uri>http://www.blogger.com/profile/08291914456961580595</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmLx8RaCfUyEbeIQYUMpOeJz22coRjSUU_eA7mNexV-mfQc6XDPyJ2uhPG20LYh1eNZj3CHNw2Jd694er1RkU3ogA1Ffn-bDQAuFj6J0lDI-6eqaQ36XYJciPFrxRdxg4sOsC1Fnmq5L9e/s72-c/screenshot.gif" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Bengaluru, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.910419699999991</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3751833191140261729.post-4702324663855818020</id><published>2011-06-06T21:41:00.007+05:30</published><updated>2012-08-19T22:22:11.878+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net 2.0"/><category scheme="http://www.blogger.com/atom/ns#" term="CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="VB.net"/><title type='text'>Asp.net : Manage web application help in directory structure</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In this topic, I will explain how application help can be managed as file system structure. Web application file system is easy to manage and systematic.&lt;br /&gt;
In this solution, Application help files can be managed under their respective category and subcategories which will be folders of the file system.  This solution will read all directories as category and file as help topic description.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ2vEdqacxv1n_-y8szCB5uOrK9qDw1jCfBYH4sSWsr7Txibahu1eM3cxewuYlevNMR0VYU9YmQTXwxUksdijQlWdobGr8KVjdJj5Ag4EliSuAvu-7529wHSLddLwnkNBOuLL_MX3I57kp/s1600/example.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5615142854522814530&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ2vEdqacxv1n_-y8szCB5uOrK9qDw1jCfBYH4sSWsr7Txibahu1eM3cxewuYlevNMR0VYU9YmQTXwxUksdijQlWdobGr8KVjdJj5Ag4EliSuAvu-7529wHSLddLwnkNBOuLL_MX3I57kp/s320/example.JPG&quot; style=&quot;display: block; height: 120px; margin: 0px auto 10px; text-align: center; width: 520px;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;codeTop&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span class=&quot;codeTop&quot;&gt;HelpFile Explorer ASPX File&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:html&quot;&gt;&lt;div class=&quot;helpTopicsTree&quot;&gt;

&lt;h1&gt;
Help Categories&lt;/h1&gt;
HelpFile Explorer ASPX File&lt;/div&gt;
&lt;/pre&gt;
&lt;pre class=&quot;brush:vbnet&quot;&gt;Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            &#39;Add a root node
            Dim rootnode As TreeNode = New TreeNode(&quot;Help and Support&quot;, &quot;Topics&quot;)
            rootnode.SelectAction = TreeNodeSelectAction.None
            rootnode.Selected = True
            TreeView1.Nodes.Add(rootnode)
            TreeView1_SelectedNodeChanged(sender, e)
            If Request.QueryString(&quot;path&quot;) IsNot Nothing Then
                Dim directoryPath() As String = Request.QueryString(&quot;path&quot;).Split(&quot;,&quot;)
                Dim dir As String = &quot;&quot;
                Dim valuePath As String = &quot;Topics/&quot;
                For Each dir In directoryPath
                    valuePath += dir
                    If TreeView1.FindNode(valuePath) IsNot Nothing Then
                        TreeView1.FindNode(valuePath).Selected = True
                        TreeView1_SelectedNodeChanged(sender, e)
                        valuePath += &quot;/&quot;
                    End If
                Next
            End If
        End If
    End Sub

    Protected Sub TreeView1_SelectedNodeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TreeView1.SelectedNodeChanged
        &#39;help files root folder
        Dim appHelpRoot As String = Server.MapPath(&quot;~&quot;) + &quot;/AppHelp/&quot;
        Dim currentDir As String = appHelpRoot + TreeView1.SelectedNode.ValuePath

        TreeView1.SelectedNode.ChildNodes.Clear()

        Dim dirCollections As String() = Directory.GetDirectories(currentDir)
        If dirCollections.Length &amp;gt; 0 Then
            Dim dir As String = &quot;&quot;
            For Each dir In dirCollections
                Dim curDir As DirectoryInfo = New DirectoryInfo(dir)
                Dim childNode As TreeNode = New TreeNode(curDir.Name, curDir.Name)
                TreeView1.SelectedNode.ChildNodes.Add(childNode)
            Next
        Else
            Dim filePath As String = currentDir + &quot;/help.txt&quot;
            If File.Exists(filePath) Then
                Dim newFile As StreamReader = File.OpenText(filePath)
                showHelpText.Text = newFile.ReadToEnd
                newFile.Close()
            End If
        End If
    End Sub&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tbrij.blogspot.com/feeds/4702324663855818020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tbrij.blogspot.com/2011/06/aspnet-manage-web-application-help-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/4702324663855818020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/4702324663855818020'/><link rel='alternate' type='text/html' href='http://tbrij.blogspot.com/2011/06/aspnet-manage-web-application-help-in.html' title='Asp.net : Manage web application help in directory structure'/><author><name>Brijendra Tiwari</name><uri>http://www.blogger.com/profile/08291914456961580595</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ2vEdqacxv1n_-y8szCB5uOrK9qDw1jCfBYH4sSWsr7Txibahu1eM3cxewuYlevNMR0VYU9YmQTXwxUksdijQlWdobGr8KVjdJj5Ag4EliSuAvu-7529wHSLddLwnkNBOuLL_MX3I57kp/s72-c/example.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3751833191140261729.post-6810408081187538986</id><published>2011-06-06T00:36:00.008+05:30</published><updated>2012-08-19T22:23:08.362+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net 2.0"/><title type='text'>asp.net : Implement theme for web application using global.asax file</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in a Web application, across an entire Web application, or across all Web applications on a server.&lt;br /&gt;
Themes are made up of majorly by cascading style sheets (CSS), images, and other resources like skins. . Themes are defined in special directories in your Web site or on your Web server App_Themes&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h3&gt;
How to implement&lt;/h3&gt;
Theme can only be applied on page while Pre_Init is under execution.  One way is to keep the code to implement theme in all the pages or add into global.asax file.&lt;br /&gt;
&lt;span class=&quot;codeTop&quot;&gt;Global.asax File&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:c#&quot;&gt;void Application_PreRequestHandlerExecute(object src, EventArgs e)
   {
       Page _currentPageInRequest = this.Context.Handler as Page;
       if (_currentPageInRequest != null)
       {
           _currentPageInRequest.PreInit += new EventHandler(page_PreInit);
       }
   }

void page_PreInit(object sender, EventArgs e)
   {
       Object _curSessionKey=HttpContext.Current.Session[&quot;CurrentTheme&quot;];
       if (_curSessionKey != null &amp;amp;&amp;amp; (!string.IsNullOrEmpty(_curSessionKey.ToString())))
       {
           Page _currentPageInRequest = this.Context.Handler as Page;
           _currentPageInRequest.Theme = _curSessionKey.ToString();
       }
       else
       {
           Page _currentPageInRequest = this.Context.Handler as Page;
           _currentPageInRequest.Theme = &quot;Default&quot;;
       }
   }&lt;/pre&gt;
In above implementation, i have used &lt;span style=&quot;font-weight: bold;&quot;&gt;Session variable&lt;/span&gt; to store current applied theme. You can use any mode of saving/reading of current theme. For example, database can be used to store current theme.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tbrij.blogspot.com/feeds/6810408081187538986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tbrij.blogspot.com/2011/06/aspnet-implemet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/6810408081187538986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/6810408081187538986'/><link rel='alternate' type='text/html' href='http://tbrij.blogspot.com/2011/06/aspnet-implemet.html' title='asp.net : Implement theme for web application using global.asax file'/><author><name>Brijendra Tiwari</name><uri>http://www.blogger.com/profile/08291914456961580595</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3751833191140261729.post-4749496477130932758</id><published>2011-06-06T00:19:00.008+05:30</published><updated>2011-09-13T20:48:44.598+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>JavaScript : Get querystring key&#39;s value for current page url.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Querystring is very most used technique to pass values across pages to manage web application state. All server-side programming languages like c#, vb.net, java etc have built-in functions to retrieve querystring values of a URL. In web browsers you can access the querystring with client-side JavaScript, but there is no standard way to parse out the name/value pairs&lt;br /&gt;
So here is a function to return a parameter you specify. The following javascript code snippet facilitates Javascript&#39;s built in regular expressions to retrieve value of the key. Optionally, you can specify a default value to return when key does not exist.&lt;br /&gt;
&lt;span class=&quot;codeTop&quot;&gt;JavaScript Function&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:js&quot;&gt;
function getQuerystring(urlkey, default_)
  {
     if (default_==null) default_=&quot;en&quot;;
        urlkey = urlkey.replace(/[\[]/,&quot;\\\[&quot;).replace(/[\]]/,&quot;\\\]&quot;);
        var regex = new RegExp(&quot;[\\?&amp;amp;]&quot;+urlkey+&quot;=([^&amp;amp;#]*)&quot;);
        var qs = regex.exec(window.location.href);
        if(qs == null)
           return default_;
        else
           return qs[1];
  }&lt;/pre&gt;
&lt;span class=&quot;codeTop&quot;&gt;How to use this function&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:html&quot;&gt;

var langauge_value = getQuerystring(&#39;lang&#39;);&lt;/pre&gt;
This function will help to retrieve current value for lang key in querystring. Call to this function will return &#39;en&#39;.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tbrij.blogspot.com/feeds/4749496477130932758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tbrij.blogspot.com/2011/06/javascript-get-querystring-keys-value.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/4749496477130932758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/4749496477130932758'/><link rel='alternate' type='text/html' href='http://tbrij.blogspot.com/2011/06/javascript-get-querystring-keys-value.html' title='JavaScript : Get querystring key&#39;s value for current page url.'/><author><name>Brijendra Tiwari</name><uri>http://www.blogger.com/profile/08291914456961580595</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3751833191140261729.post-2583882455598985343</id><published>2009-04-10T21:03:00.020+05:30</published><updated>2011-06-05T23:57:17.897+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net 2.0"/><category scheme="http://www.blogger.com/atom/ns#" term="custom validator"/><title type='text'>Custom Validator for FileUpload in asp.net 2.0</title><content type='html'>&lt;p&gt;Validation Web controls are ASP.NET 2.0 Web controls designed to validate form fields control inputs with some rules apply to it. Previously it used to achieve with the javascript/vbscripts functions on user controls like text box and drop down list. it was bit annoying and time consuming and also code grows to longer line which is difficult to manage.&lt;/p&gt;&lt;p&gt;asp.net 2.0 introduces new validation controls to resolve these issues. One of which I am discussing here,&lt;/p&gt;&lt;p&gt;&lt;b&gt;CustomValidator&lt;/b&gt;- Checks the form field&#39;s value against custom validation logic that you, the developer, provide with the help of client script written in javascript.&lt;/p&gt;&lt;br /&gt;&lt;span class=&#39;codeTop&#39;&gt;javascript function&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;brush:js&quot;&gt;&lt;br /&gt;       function check_ClientValidate(source, args)&lt;br /&gt;           {&lt;br /&gt;             var _pageStatus = true;&lt;br /&gt;             if(args.Value != &quot;&quot;)&lt;br /&gt;               { _pageStatus = true;}&lt;br /&gt;             else&lt;br /&gt;               { &lt;br /&gt;                 con = false;&lt;br /&gt;                 document.getElementById(&quot;CustomValidator1&quot;).innerHTML = &quot;Please Select file!&quot;;&lt;br /&gt;               }&lt;br /&gt;             if( _pageStatus == true)&lt;br /&gt;               {&lt;br /&gt;                 var file1 = args.Value.substring(args.Value.length - 3, args.Value.length); //doc&lt;br /&gt;                 if( file1 == &quot;doc&quot;)&lt;br /&gt;                 { &lt;br /&gt;                    _pageStatus = true;&lt;br /&gt;                 }&lt;br /&gt;                 else&lt;br /&gt;                 { &lt;br /&gt;                    _pageStatus = false;&lt;br /&gt;                    document.getElementById(&quot;CustomValidator1&quot;).innerHTML = &quot;You can upload doc file only.&quot;;&lt;br /&gt;                  }&lt;br /&gt;               }&lt;br /&gt;             if( _pageStatus == true)&lt;br /&gt;               { args.IsValid = true;}&lt;br /&gt;             else&lt;br /&gt;               { args.IsValid = false;}&lt;br /&gt;           }&lt;br /&gt;      &lt;/pre&gt;&lt;br /&gt;&lt;p&gt;You should also provide server validation code as well to perform both ways. this is to minimize error on server side in case client side validation get failed. [ techincal reasons..] Implement same logic here in server validation function to avoid runtime error.&lt;/p&gt;&lt;br /&gt;&lt;span class=&#39;codeTop&#39;&gt;asp.net page controls .aspx.vb file&lt;/span&gt;&lt;br /&gt;&lt;pre class=&#39;brush:vbnet&#39;&gt;&lt;br /&gt;Protected Sub CustomValidator1_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate&lt;br /&gt;    Dim _pageStatus As Boolean = True&lt;br /&gt;    If args.Value &lt;&gt; (&quot;&quot;) Then&lt;br /&gt;       _pageStatus = True&lt;br /&gt;    Else&lt;br /&gt;       _pageStatus = False&lt;br /&gt;       CustomValidator1.Text = &quot;Please select File!&quot;&lt;br /&gt;    End If&lt;br /&gt;    If _pageStatus Then&lt;br /&gt;       Dim file1 As String = args.Value.Substring(args.Value.Length - 3, args.Value.Length)&lt;br /&gt;       If file1.Equals(&quot;doc&quot;) Then&lt;br /&gt;         _pageStatus = True&lt;br /&gt;       Else&lt;br /&gt;         _pageStatus = False&lt;br /&gt;         CustomValidator1.Text = &quot;You can upload file such as .doc&quot;&lt;br /&gt;       End If&lt;br /&gt;    End If&lt;br /&gt;    If _pageStatus Then&lt;br /&gt;        args.IsValid = True&lt;br /&gt;    Else&lt;br /&gt;        args.IsValid = False&lt;br /&gt;    End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;i&gt;this will solve your problem of file upload with limited extension.&lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://tbrij.blogspot.com/feeds/2583882455598985343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tbrij.blogspot.com/2009/06/custom-validator-for-fileupload-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/2583882455598985343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3751833191140261729/posts/default/2583882455598985343'/><link rel='alternate' type='text/html' href='http://tbrij.blogspot.com/2009/06/custom-validator-for-fileupload-in.html' title='Custom Validator for FileUpload in asp.net 2.0'/><author><name>Brijendra Tiwari</name><uri>http://www.blogger.com/profile/08291914456961580595</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>