Posts

Showing posts from October, 2011

difference between stored procedure and function

Below are few differences between Stored Procedure and Function 1) Stored procedure are compiled for first time and compiled format is saved and executes compiled code when ever it is called. But function is compiled and executed every time it is called. 2) Function must return a value but in stored procedure it is optional. 3) Function takes one input parameter it is mandatory but stored procedure may take o to n input parameters. 4) Functions can be called from select statement, but stored procedures can not be called from select statement. 5) We can build logic in functions and we can even break complex logic in to methods. 6) We can use try catch statements in stored procedures but in functions we can not use. 7) We can not use insert,delete,update and create statements in functions but in stored procedures we can use those statements. 8 ) Functions can have only input parameters but stored procedure can have input and out put parameters Thanks and Regar

Difference between Respone.Redirect and server.transfer

Introduction This article tell you the difference between  Server.Transfer  and  Response.Redirect. Server.Transfer v/s Response.Redirect Both “Server” and “Response” are objects of ASP.NET. Server.Transfer and Response.Redirect both are used to transfer a user from one page to another page. Both are used for the same purpose but still there are some differences are there between both that are as follows: Syntactically both are different, if you want to transfer the user to a page named newpage.aspx then syntax for both methods will be, Response.Redirect(“newpage.aspx”)  and  Server.Transfer(“newpage.aspx”) Response.Redirect involves a roundtrip to the server whereas Server.Transfer conserves server resources by avoiding the roundtrip. It just changes the focus of the webserver to a different page and transfers the page processing to a different page. Roundtrip means in case of Response.Redirect it first sends the request for the new page to the browser then browser sends the re