Posts

Showing posts from September, 2009

Tips to improve the performance of ASP.Net Application

1. Disable the Debug Mode or Set Debug ="false" How it affect performance: By default this attribute is "true" when you create new application and is useful when you are developing the application. Debug = true means that pdb information to be inserted into file and this results a larger file size and it's performance issue. Before deployment you should set the following tag 2. Set trace enabled="false" How it affects performance: With help of tracing, we can track the application's and the sequences. Enabling tracing adds performance overhead and might expose private information, so it should be enabled only while an application is being actively analyzed. You can turn off tracing using - - - - -/> 3. While developing using Visual Studio.NET When you set Configurations Option as "debug" mode, it creates pdb file to store the debug information hence before deploying the application set it to the "Release" mod...

What is new features in 4.0

Dynamic binding Named and optional parameters COM specific interop features Co anVariance

What's New in .NET 3.5

* What's New in .NET 3.5 It is recommended to read first 'What's New in C# 3.0' ASP.NET Support for enabling existing ASP.NET 2.0 pages for AJAX Creation of ASMX & WCF based web services and consuming them from AJAX Library ASP.NET server side application services like authentication, roles management exposed as web services ASP.NET Merge Tool - a new tool for merging pre-compiled assemblies New ListView control which supports edit, insert, delete, sorting & paging ASP.NET integrated with core IIS 7.0 which makes ASP.NET services like authentication & caching available for other content types also. Microsoft AJAX Library to support AJAX based web development Base Classes & CLR Support for CSharp 3.0 including LINQ. HashSet : A high performance collection of type set. Time Zone Improvements : to develop applications which operate in multiple time zones Minor Improvements in Threading, Reflection and controlling the GC behavior Others Cl...

A Delegate Usage Example

A Delegate Usage Example namespace MyFirstDelegate { //This delegate can point to any method, //taking two integers and returning an //integer. public delegate int MyDelegate ( int x, int y); //This class contains methods that MyDelegate will point to. public class MyClass { public static int Add( int x, int y) { return x + y; } public static int Multiply( int x, int y) { return x * y; } } class Program { static void Main( string [] args) { //Create an Instance of MyDelegate //that points to MyClass.Add(). MyDelegate del1 = new MyDelegate ( MyClass .Add); //Invoke Add() method using the delegate. int addResult = del1(5, 5); Console .WriteLine( "5 + 5 = {0}\n" , addResult); //Create an Instance of MyDelegate ...

Linq Top 10 records

var myResults=(from emp in db.employees order by emp.emp_name where emp.emp_name.startwith("a") select emp).Take(10) http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx

How to create assembly and functions using CLR

http://towardsnext.wordpress.com/2008/12/12/clr-string-titlecase-function-in-sql-server-2005-clr-integration/ With new feature of CLR integration we can provide function with in our assemblies which can be accessed by the user in the TSQL statements. Let us now try to create one title case function. First create one library project in visual studio 2005. Then create one class with one function inside that. using System; using System.Collections.Generic; using System.Text; using System.Data.SqlTypes; using Microsoft.SqlServer.Server; namespace AssemblyFunctions { public partial class MySQLFunctions { [ SqlFunction (IsDeterministic = true , IsPrecise = true )] public static string TitleCase( string data) { string caseData = data.ToString().Substring(0, 1).ToUpper() + data.ToString().Substring(1, data.ToString().Length -1).ToLower(); return caseData; } } } Now we can compile this assembly and keep it at one location. Then move to MSSQL Management Studio and there in query win...

Share point video Link

Share point video Link

How to handle optional parameters for sps?

Create procedure dbo.SearchEmployee ( @Employeename varchar(20), @EmployeeDesig varchar(20), @EmployeeLocation varchar(20), @EmployeeInterest varchar(20) ) as begin set nocount on set @EmployeeName = '%' + @EmployeeName + '%' set @EmployeeDesig = '%' + @EmployeeDesig + '%' set @EmployeeLocation = '%' + @EmployeeLocation + '%' set @EmployeeInterest = '%' + @EmployeeInterest + '%' SELECT EmployeeName from EmployeeMaster (nolock) WHERE (nullif(@EmployeeName, '') is null or EmployeeName like @EmployeeName) and (nullif(@EmployeeDesig, '') is null or EmployeeDesignation like @EmployeeDesig) and (nullif(@EmployeeLocation, '') is null or EmployeeLocation like @EmployeeLocation) and (nullif(@EmployeeInterest, '') is null or EmployeeInterest like @EmployeeInterest) set nocount off end go seaching on name and interests exec SearchEmployee 'shriram', null, null, 'SQL' searching on intere...

http://www.sharepointboost.com/download.html

http://www.sharepointboost.com/download.html

Sharepoint Help Link

Peers Down load Link http://rshelton.com/Tags/SharePoint/default.aspx
File help Link
Create Proc Sp_helpDate @mark1 int=10,@mark2 int=10,@mark3 int=10,@mark4 int=10 AS BEGIN SELECT @mark1+@mark2+@mark3+@mark4 END EXEC Sp_helpDate @mark3=70

Download Help Links

esnips toodoc

how to raise button on click event in aps code behind?

Here is a simple sample I think that does what you want it to do: html xmlns= "http://www.w3.org/1999/xhtml" > script runat= "server" > protected void popbtn_Click(object sender, EventArgs e) { Page.ClientScript.RegisterClientScriptBlock(typeof(string), "Popup", "window.alert(\"" + inputtxtbx.Text + "\");", true); } script > head runat= "server" > title >Page title > head > body > form action= "default.aspx" runat= "server" > asp:TextBox ID= "inputtxtbx" runat= "server" /> asp:Button ID= "popbtn" runat= "server" Text= "Show Popup" OnClick= "popbtn_Click" /> form > body > html >

How to show millions of records retrieve from DB and display in the datagrid

Using paging, when user clicks the page number, then 1. Take a page number 2. select the records from DB with in that range only, we can user rownumber() to get the range records, 3 . Show in the datagrid 1- Give Paging to user where you show lesser amount of records.. and give page numbers to users. 2- using paging at db server, in sql server 2005 and onwards you can do that easily. 3- Provide some filters on the screen. 4- If they want to see whole input however, use loan on demand kind of stuff... like show then when they scroll (1 M would not be visible at one time) -- it would be like paging but all would be on one page... Paging Records Using SQL Server 2005 Database - ROW_NUMBER Function Paging Records Using SQL Server 2005 Database - ROW_NUMBER Function by David Hayden ( Sarasota Web Design ) SQL Server 2005 has a ROW_NUMBER Function that can help with paging records for you database applications. ROW_NUMBER returns a sequential number, starting at 1, fo...

Shivprasad Koirala Blog

Shivprasad Koirala Blog

Sharepoint Peers Link

knarayanarao : Peers

SharePoint Help link

Sharepoint help Link

Division Operation In SQL

declare @a int,@b int declare @C float set @a = 100 set @b=200 set @c= cast(@a as float)/cast(@b as float) print @C