Sunday, August 31, 2008

Display Specific Block while printing

link href="styles/PrintStyle.css" rel="stylesheet" type="text/css" media="print"

Server.Transfer vs Response.Redirect vs Server.Execute

Server.Transfer conserves server resources. Instead of telling the browser to redirect, it simply changes the "focus" on the Web server and transfers the request. And it can be used to transfer to the page which is in the same site or webserver.

Server.Execute inserts the form output in the current form.

Response.Redirect is also used to redirect the page to some other webserver whereas server.transfer won't do this. when the statement Response.Redirect() is executed, the current page is immediately unloaded and the identified page is loaded.

RegisterStartupScript vs RegisterClientScriptBlock

Both of them emits a client-side script block in the page response.

Page.RegisterStartupScript - puts script before the end of Form tag whereas
Page.RegisterClientScriptBlock - puts script after the beginning of Form tag.

Friday, August 22, 2008

URL Rewriting

http://msdn.microsoft.com/en-us/library/ms972974.aspx
http://ruslany.net/2009/04/10-url-rewriting-tips-and-tricks/

Thursday, August 21, 2008

HttpHandler & HttpModule

HTTP modules differ from HTTP handlers. HTTP modules are called for all requests and responses, whereas HTTP handlers run only in response to specific requests

http://www.codeproject.com/KB/aspnet/http-module-ip-security.aspx
http://www.davidhayden.com/blog/dave/archive/2007/09/24/CreateHttpModulesASPNETPluggableFunctionality.aspx

http://www.worldofasp.net/tut/HttpHandlers/Using_HttpHandlers_and_HttpModules_in_your_ASPNET_Websites_90.aspx

Wednesday, August 20, 2008

.Net Technical

http://www.codeproject.com/KB/dotnet/dotnetinterviews.aspx
http://www.dotnetuncle.com/Framework/33_CLI_CTS_Metadata_CLS_IL_VES.aspx
http://www.dotnetcurry.com/ShowArticle.aspx?ID=70
http://www.careerride.com/ASP-NET-Life-Cycle.aspx
http://www.go4expert.com/forums/showthread.php?t=3158

Download Larger File in Chunks

code is available in
http://support.microsoft.com/kb/812406/
http://www.gridviewguy.com/ArticleDetails.aspx?articleID=196

Tuesday, August 19, 2008

Datagrid vs Datalist vs Repeater

http://aspnet.4guysfromrolla.com/articles/052103-1.aspx

asp.dll, aspnet_isapi.dll and aspnet_wp.exe

For example, a Web site that serves up classic ASP pages has the .asp extension mapped to the asp.dll ISAPI extension. The asp.dll ISAPI extension executes the requested ASP page and returns its generated HTML markup.

When an ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process aspnet_wp.exe.

http://www.codersource.net/aspnet_compilation_execution.html
http://aspnet.4guysfromrolla.com/articles/020404-1.aspx
http://www.eggheadcafe.com/community/aspnet/17/10040175/check-this-to-download-la.aspx

Protecting(Securing) Files with ASP.NET (using HttpHandler)

http://aspnet.4guysfromrolla.com/articles/020404-1.aspx
http://msdn.microsoft.com/en-us/library/f3ff8w4a(VS.71).aspx
http://www.gridviewguy.com/ArticleDetails.aspx?articleID=196 (downloads small chunks of large file)

Monday, August 18, 2008

ViewState Vs Data Caching

http://www.codersource.net/asp_net_viewstate_versus_data_caching.aspx

Data Caching is the keeping of frequently used data in memory(RAM) for ready access by your ASP.NET. (Mostly used with frequent database access of huge number of records while paging)

Whereas Viewstate stores the page's controls data in hidden field in the page itself. ViewState also provides a StateBag, which is a special collection or dictionary, for each page that you can use to store any object or value, associated with a key, to retain across PostBacks. ViewState is by default serialized and passed across page PostBacks as a hidden form field, __VIEWSTATE, that is Base64 encoded so that it is not easily readable, but not encrypted.

Cache ASP.NET pages

To store the output cache for a specified duration

Declarative Approach:

<%@ OutputCache Duration="60" VaryByParam="None" %>


Programmatic Approach:

Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
Response.Cache.SetCacheability(HttpCacheability.Public);


For more...http://support.microsoft.com/kb/323290