Solved

Dynamic URL

Posted on 2007-12-04
8
186 Views
Last Modified: 2013-12-16
Ok, here is what should be a simple one!  I have a URL which I use in a redirect.  I want to be able to code the server value, e.g., www.somewhere.com as a value in the URL.

I want to do something like the example below where psServerName represents the web address.  I don't have the syntax correct, or else I need to build the entire URL before using it in the re-direct.

axWebBrowser1.Navigate("https://+psServerName+/aspnet/safecopackage/Quotespecialty.aspx?Q_STATUS=NEW&QuoteID="+psQuoteID);

Open in new window

0
Comment
Question by:66chawger
  • 4
  • 3
8 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20405934
axWebBrowser1.Navigate("https://"+psServerName+"/aspnet/safecopackage/Quotespecialty.aspx?Q_STATUS=NEW&QuoteID="+psQuoteID);
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 125 total points
ID: 20405946
look at the quotes near to psServerName

also you can do as:
axWebBrowser1.Navigate(string.Format("https://{0}/aspnet/safecopackage/Quotespecialty.aspx?Q_STATUS=NEW&QuoteID={1}",psServerName,psQuoteID));
0
 

Author Comment

by:66chawger
ID: 20405976
Jaime, I see you got another one of my questions!!!  So you can use double quotes inside double quotes? Maybe I just got ahead of myself.  I did try this and saw that when I used the double quotes inside double quotes that the url is in, the rest of the URL was not underlined....e.g., like when you enter an email address or hyperlink in word......make sense?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 8

Expert Comment

by:Jeff Perry
ID: 20405977
I am a little confused as to what you are asking but I will take a crack at it.

If you want +psServerName = www.somewhere.com in your redirect then yes you would need the DNS record for www.somewhere.com to be created and functional before your redirect containing +psServerName would become functional.
0
 

Author Comment

by:66chawger
ID: 20405997
That is cool, using identifers or aliases....Let me give that a whirl.  I think this is very clean!
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20406231
>>So you can use double quotes inside double quotes?
I think this is not the case here, but in this case, you have to use \"  inside, instead of a single "
0
 

Author Closing Comment

by:66chawger
ID: 31412667
It is nice to know even the easier questions get exposure.  Great Job!
0
 

Author Comment

by:66chawger
ID: 20412868
Jaime, can you look at my post regarding passing a variable from my code behind to my re-directed .cs user control?
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question