Tuesday, April 29, 2008

What is HTTP?


  • HTTP is actual communication protocol that enables web browsing.
  • Hypertext:- Textual data which is linked across multiple documents or locations
  • HTTP is used by server and your computer to transfer data between them. HTTP is an application protocol.
  • HTTP defines how messages are formatted and transmitted and what actions web servers and web browsers should take in response to various commands.
  • HTTP GET:- GET should be used if and only if the form processing is idempotent , means pure query form (many database searches have no visible side-effects and make ideal applications of query forms)
  • HTTP POST:- if the service associated with the processing of a form has side effects (e.g. modification of a database or subscription to a service), the method POST should be used
  • It communicates between the server and the output which is sent to the client
  • If you don't want the browser to cache the page (for quicker download times) then you can set Response.Expires=0
  • Buffer:- if buffer is set to true, the server processes the entire ASP script before sending any of the file to the client, otherwise the server will send data to client as it processes it.

Tips & Tricks

Hey friends,

This post I have made to provide tips about SQL server. Most of you will find this as a very basic kind of tips but as I want to share my experience, so will say that knowing this information about SQL server was also very helpful.

1) How to get Comma Separated value from one database field (like 'surjit', 'harjit', 'ramu', 'fakirchand')?

In stored procedure use the following:
Declare @commaVar as varchar(4000)
Select @commaVar = IsNull(@CommaVar +',','') + convert(varchar,) from

/* That's it friends----don't write this in Stored procedure :)*/

2) How to reduce LogFile size when error is coming to truncate size?
Most of time, need arises to truncate the size of database log file. Use the following to make it work:


That's it. Enjoy.

Monday, April 28, 2008

Javascript links

Hi friends,

Instead of providing details about my own experiences, I am keen to provide information about other useful information available on internet regarding Javascript.

Following are useful links:
1) http://www.java2s.com/Code/JavaScript/Javascript-Objects/ShowModalDialogwindowshowModalDialogURLmyArguments.htm

2) Javascript Calendar (here is something we all always look for)

use the underlying link to add javascript calendar on your web page.... FREE..... yepeee..

Monday, April 21, 2008

Sample Codes---Part 2

4) Get Client id of any asp.net control using javascript method

Following are conditions to get client ID of respective .net control
1) Container of that control should have some ID defined like if in 'td' then td id='someid'.
2) You should know about the TagName of that respective control when it renders on browser. i.e. asp:textbox control becomes INPUT, asp:Label becomes SPAN, etc

Thats it ...... now use the underlying methods to access the client id of respective .net control clientside... enjoy

function getId(ctrlId)
return document.getElementById(ctrlId);

function getElementsByTag(control,tagName)
return control.getElementsByTagName(tagName);
function getClientId(containerId,controlId, tagName)

var returnId=null;
var ctlContainer = getId(containerId);
if(null != ctlContainer)
var elements = getElementsByTag(ctlContainer,tagName)
if (elements[i].id.length > 0)
tmp = elements[i].id.split('_');
id = tmp[tmp.length-1];
returnId = elements[i].id;
return returnId;