Monday 29 August 2016

what is Stuff in SQL Server 2008?




  It is function used to replace the string between specified place i.e. we can replace string between two specified place with other string. It’s take four parameters i.e. string_exp1,start_position, no_of_character,string_exp2.

Syntax:-

STUFF(expression1 ,start_position,no_of_character,expresion2_wtih_replace)

Here expression1 in which we have to do replacement.
Start_position is start point of replacement.
No_of_character is how many character we have to replace.
expresion2_wtih_replace is value after replace 

Example:-

Select STUFF('abcdefgh',3,5,'123')

Ouput:-

ab123h

Wednesday 3 August 2016

what is httphandler in asp.net?



Httphandler is used to handle specific request based on it’s extension. The most handler is asp.net page handler that process .aspx file. When user request an .aspx file, the request is processed by page through page handler. You can create your own http handler that render custom output to browser.

Types of httphandler:-

1.)   ASP.Net Page Handler (.aspx ):- The default handler for all asp.net page.
2.)   Web Service Handler(.asmx):- The default HTTP handler for Web service pages created as .asmx files in ASP.NET.
3.)   Generic Web Handler(.ashx) :- The default HTTP handler for all Web handlers that do not have a UI and that include the @ WebHandlerdirective.
4.)   Trace handler (trace.axd) :- A handler that displays current page trace information.

Note:- References from MSDN.