riad
riad

Reputation: 7184

How send value to a ASP.NET page?

Dear all, In PHP we send value to another page using GET method.Like: http://localhost/abc.php?val=123 where abc.php take the value using $_GET['val'] and do the necessary.Now i need to do the same task in asp.... send value to a stand alone ASP.NET page [not from a ASP page] and after taking the value do the necessary.Now,How can i send a value to a asp.net page in the same way and receive the value into that page?pls help..

Upvotes: 0

Views: 360

Answers (3)

robert
robert

Reputation: 1533

for c#

string myval=Request.QueryString["val"];  

for vb.net

FIXED, thanks to kyle

Dim myval As String
myval=Request.QueryString("val")

Upvotes: 2

Kyle Trauberman
Kyle Trauberman

Reputation: 25684

The same way. You can send the same query string to your aspx page http://localhost/abc.aspx?val=123 then access the code using the Request.QueryString property.

string queryStringValue = Request.QueryString["val"];

Upvotes: 3

Paul
Paul

Reputation: 12440

You can use <%= Request.QueryString["val"]%>

Upvotes: 1

Related Questions