Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 map

Author  Topic 

notsosuper
Posting Yak Master

190 Posts

Posted - 2005-07-22 : 12:02:41
My question is I have text boxes for address and when user enters address and click on hyperlink it will take the user the mapquest along with the values user entered and show the map from mapquest in the code you gave url and if I hard code this

http://www.mapquest.com/maps/map.adp?address=1150+WEST+MAGIC+WAY&city=ANAHEIM&state=California&country=United+States&zip=92802&size=small&zoom=9

of course link is taking me to this address' map in mapquest. What I need is, whatever value my user enters to address text box and city text and state zip text boxes in my vb.net application, this tag should take the value of the text boxes and put in the tag. How can I do that?
for example txtaddress1.text = 111 somewhere street
txtaddress2 .text = apt #5
txtcity .text = columbus
dropdownbox state = NY
zip = 12345
when user enters this values , it should appear on the http address accordingly.

jhermiz

3564 Posts

Posted - 2005-07-22 : 13:42:30
Look at how it works in map quest, you said you entered an address and it took you there. So look at the resulting link how it places address=...&city=....&state=....

those are called parameters. There names are right there in the url, address, city, state etc...

All you do is append to the string:
http://www.mapquest.com/maps/map.adp?

adding those parameters. When you want to "request" those parameter in asp.net you do:

Request("varname")

Jon



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

notsosuper
Posting Yak Master

190 Posts

Posted - 2005-07-22 : 14:57:25
Thank you so much replying...
Okay if I put this code below in html part would it work or do I need something else

dim straddress1 = txtaddress1.text
http://www.mapquest.com/maps/map.adp?address=Request("straddress1")&city=Request("strcity")
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-07-22 : 15:10:07
no u generate the string then display it:

strMyHtml = "http://www.mapquest.com/maps/map.adp?address=" & txtAdd.Text & "&city=" & txtCity.Text & ....
Response.Redirect(strMyHtml)



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

notsosuper
Posting Yak Master

190 Posts

Posted - 2005-07-22 : 15:35:19
It works great thank you so much!!!!!!!
Go to Top of Page
   

- Advertisement -