Saturday, 11 February 2017

What is QueryString??


Query string is used to transfer small amount of data into one web form to another web form in URL.

Query string is the part of a uniform resource locator (URL) containing data that does not fit conveniently into a hierarchical path structure. The query string commonly includes fields added to a base URL by a Web browser or other client application, for example as part of an HTML form.

Example:-

To loop through all the n variable values in a Query String:

The following request is sent:


http://www.ProgrammerSolution.com/test/names.asp?n=Ram&n=Shyam
and names.asp contains the following script:


<%
for i=1 to Request.QueryString("n").Count
  Response.Write(Request.QueryString("n")(i) & "<br>")
next
%>
 
The file names.asp would display the following:


Ram  
Shyam

No comments:

NOCOUNT In SQL Server This Statement is used to stop the message that shows the count of the number of rows affected by the SQL statement...