• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

Dynamic URL

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
66chawger
Asked:
66chawger
  • 4
  • 3
1 Solution
 
Jaime OlivaresSoftware ArchitectCommented:
axWebBrowser1.Navigate("https://"+psServerName+"/aspnet/safecopackage/Quotespecialty.aspx?Q_STATUS=NEW&QuoteID="+psQuoteID);
0
 
Jaime OlivaresSoftware ArchitectCommented:
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
 
66chawgerAuthor Commented:
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Jeff PerryWindows AdministratorCommented:
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
 
66chawgerAuthor Commented:
That is cool, using identifers or aliases....Let me give that a whirl.  I think this is very clean!
0
 
Jaime OlivaresSoftware ArchitectCommented:
>>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
 
66chawgerAuthor Commented:
It is nice to know even the easier questions get exposure.  Great Job!
0
 
66chawgerAuthor Commented:
Jaime, can you look at my post regarding passing a variable from my code behind to my re-directed .cs user control?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now