How send value to a ASP.NET page?
Dear all, In PHP we sen开发者_StackOverflow社区d 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..
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"];
for c#
string myval=Request.QueryString["val"];
for vb.net
FIXED, thanks to kyle
Dim myval As String
myval=Request.QueryString("val")
You can use <%= Request.QueryString["val"]%>
精彩评论