Friday, 2 December 2011



In this post i am listing some GridView EditItemTemplate examples in Asp.Net 2.0,3.5 with Csharp and VB.NET.





Ajax autocomplete extender textbox in GridView

Example of Ajax Autocomplete Extender TextBox in EditItemTemplate of GridView.





Install Configure Windows Server AppFabric




Install Windows Server Appfabric
Install,Configure Windows Server AppFabric cache services in asp.net 3.5 and 4.0.

Here i am explaining steps to install and configure windows server appfabric cache services in asp.net 3.5 and 4.0.

1. Download and run windows server appfabric from this link

Select the features you want to install, Confirm the next screen and finish the installation.



Install AppFabric

After installation is finished, Go start > all programs> windows server AppFabric and launch configure AppFabric

Sql Query Optimization

Sql Query Optimization in MS SQL Server To Improve Performance of ASP.NET web applications.

Data retrieval FROM database in asp.net applications is a most common task and writing optimized queries can have a huge impact on perfirmance of application if database is huge or containing thousands of records in table.

Here i am mentioning few tips to remeber while writing sql queries for optimal performance.
1. Use columns name instead of * in SELECT statements.

1Use:
2 
3SELECT column1,column2,column3 FROM TableName
4 
5Insted of
6 
7SELECT * FROM TableName

Create Setup And Deployment Project in Visual Studio 2008/2010


Create setup Project In Visual Studio

In this example i am going to explain how to create setup and deployment project for winforms windows application using visual studio 2005/2008/2010.

Similar approach can be applied for creating setup project for web application as well.











First of all create any sample windows/web application.

Create setup project

right click on solution explorer root and select Add > New project 


In add new project dialog box select setup and deployment from other project types and then select Setup Project.


In the setup project file system editor window, right click on Application folder > Add > Project Output 


Now select primary output from next dialog box and click on OK.



Right click on User's desktop and create shortcut to primary output in application folder.


Similarly add shortcut in user's program menu.


Build the project by right clicking on setup project name and run the setup.


Hope this helps 




Download the sample code attached 

Maintain Scroll Position On After Postback in Asp.Net

Maintain scroll position after postback
Maintain Scroll Position on or After Postback in Asp.Net 2.0 3.5.

In this example i'm explaining different methods of maintaining scroll position on/after postback in asp.net 2.0,3.5 web pages or applications.









Forms Authentication In Asp.Net

Forms Authentication in asp.net


In examples below i'm explaining how to use forms authentication in Asp.Net and forms authentication tickets in Asp.net.












Forms Authentication In Asp.Net 2.0 and 3.5


Forms Authentication in ASP.NET is technique to decide how users can access your web application.

Using froms authentication we can decide certain users can access only certain pages or we can control the anonymous access, we can implement folder level access and access based on roles.

we can manage the access through web.config file or folder level access and through multiple web.config files using forms authentication.




Forms Authentication Ticket In Asp.Net 2.0 And 3.5


In this article i am going to describe how to implement Forms authentication tickets and manage user roles based access in ASP.NET using C# and multiple web.config files



Bypass Forms Authentication Or Skip Authorization


Some readers ask me how to skip or bypass forms authentication or Authorization for selected pages in asp.net or a scenario where only few pages on site needs user to log in rest can be accessed without login.

Select Find Nth Highest Salary Record In Sql Server

Find or Select nth highest salary record in ms sql

This is most frequentky asked question how to select or get nth highest record or nth row/record from any column of sql table.

for example select get or fetch 2nd (second highest) or nth highest salary of employee or 10th highest record from the table.

There are various ways to achieve this result, i've mentioned few here.