Need Immediate Help....Query String

Posted by Sina under ASP.NET on 6/5/2012 | Points: 10 | Views : 819 | Status : [Member] | Replies : 3
Hi..can anyone pl help me in solving an issue..I have a page wherein i have used formview to load data from database ..similar to repeater..but since formview loads only one record data once i need to perform the the loading of the other records by using query strings but i am not much used to Querystrings...plz help me..thanks in advance.

@Sina


Responses

Posted by: Svandanapu on: 6/5/2012 [Member] Starter | Points: 25

Up
0
Down
You can pass the querty string along with the url as below
...Test.aspx?myQueryString = 'ABC'
Here myQueryString is the query string variable, you can give any name and "ABC" is the value of the query string
You can access Query string in Test.aspx page load as below
if(Request["myQuerystring"] != null)
{
string strQueryStringValue = Request["myQueryString"].toString();
}

Sina, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ajay.Kalol on: 6/6/2012 [Member] Starter | Points: 25

Up
0
Down
You can Pass Data with Query String.
e.g

Reponse.Redirect("www.abc.com/My.aspx?Name = 'ABC'");


Here Name is the query string variable, you can give any name and "ABC" is the value of the query string

You can Pass Multiple Variable in QueryString Like:
Reponse.Redirect("www.abc.com/My.aspx?Name = "ABC"&ID="1" ");


You can access Query string in My.aspx page as below

if(Request["Name"] != null )

{
string str= Request["myQueryString"].toString();
}



But Querystring has a limit of characters for different browser.
To know more about it.
http://stackoverflow.com/questions/812925/what-is-the-maximum-possible-length-of-a-query-string

if this is helpful mark it as answer.

Enjoy...


Ajay
ajaypatelfromsanthal.blogspot.in

Sina, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Chikkanti on: 6/6/2012 [Member] Starter | Points: 25

Up
0
Down
hi see this to know about QueryString
http://chikkanti.wordpress.com/2011/12/21/querystring/

chikkanti

Sina, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response