Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Passing Value on URL (http://www.velocityreviews.com/forums/t80919-passing-value-on-url.html)

- Steve - 06-19-2004 10:30 PM

Passing Value on URL
 
I can't find the answer to this because I don't know what it's called.

I want to e-mail my users a link that is customized to them. For example I
want them to click on the link and have the E-mail Textbox already filled
out with their e-mail address.

So I believe I want to send them a URL that looks something like
http://site.com/page.aspx?Email=user1@domain.com.

How do I grab that e-mail address in my ASP.NET page though?

--

Steve Evans
Email Services
SDSU Foundation
(619) 594-0708




Mark Fitzpatrick 06-19-2004 10:59 PM

Re: Passing Value on URL
 
The variables contained in a URL are called querystring variables. You can
access it using the Request.Querystring collection. In C# it would be like:

string strEmail = Request.QueryString["Email"].ToString();

To guarantee success though, you'll need to test for the querystring
variable being null like so:

stirng strEmail = "";
if(Request.QueryString["Email"] != null)
{
strEmail = Request.QueryString["Email"].ToString();
}

Hope this helps
Mark Fitzpatrick
Microsoft MVP - FrontPage

"- Steve -" <sevans@foundation.sdsu.edu> wrote in message
news:ehQXY0kVEHA.2716@tk2msftngp13.phx.gbl...
> I can't find the answer to this because I don't know what it's called.
>
> I want to e-mail my users a link that is customized to them. For example

I
> want them to click on the link and have the E-mail Textbox already filled
> out with their e-mail address.
>
> So I believe I want to send them a URL that looks something like
> http://site.com/page.aspx?Email=user1@domain.com.
>
> How do I grab that e-mail address in my ASP.NET page though?
>
> --
>
> Steve Evans
> Email Services
> SDSU Foundation
> (619) 594-0708
>
>
>





All times are GMT. The time now is 08:47 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57