[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:

ASP.NET - Need to create an email link that will pass two variables.

I have inherited an ASP.NET application. I have an email that is generated to the user and it contains an email link for that person to click on to get to a form. Here's what the email link looks like:

http://nshare.nasco.com:81/CWMS/OSResponse.aspx?ContractNum=121

The Contract Num is being passed just fine, but there is one more variable that is not being passed. The original code looks like this:

SeatingLink = "http://nshare.nasco.com:81/CWMS/OSResponse.aspx?ContractNum=" & contractNum & "&Do=Change"

The part I'm not getting in the email link is the Do = Change. My guess is that it's a syntax error, but of course I'm not getting any errors when I build the project. Any help would be greatly appreciated! Thanks!

0
khawkins96
Asked:
khawkins96
  • 3
  • 3
1 Solution
 
ChetOS82Commented:
I would switch them around:

SeatingLink = "http://nshare.nasco.com:81/CWMS/OSResponse.aspx?Do=Change&ContractNum=" & contractNum
0
 
khawkins96Author Commented:
Thank you for the suggestion. I tried it but I'm still only getting the contractnum. Any other thoughts?
0
 
ChetOS82Commented:
Even after that??  Sounds like you are not changing the code in the right spot.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
aki4uCommented:
Do you have SeatingLink setup somewhere else in the code...maybe you are overwriting it with something else?
0
 
khawkins96Author Commented:
The original line of code was

SeatingLink = "http://nshare.nasco.com:81/CWMS/OSResponse.aspx?ContractNum=" & contractNum & "&Do=Change"

And here is what I have now

SeatingLink = "http://nshare.nasco.com:81/CWMS/OSResponse.aspx?Do=Change&ContractNum=" & contractNum

Am I missing anything?
0
 
ChetOS82Commented:
Nope, both should work actually, but since that change didn't do anything at all, that tells me that you are not editing the correct file, or that the code that controls what you are trying to do is elsewhere.
0
 
khawkins96Author Commented:
Found it. There was a key data value missing in my test database that I was missing. It's been a long week:-)

Thanks for the help!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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