Click here to Skip to main content
15,118,172 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,

My website is in asp.net and c# in code-behind. It uses Google Authentication to let the user log in And what it does is when an employee completes a form, an email will be sent to the approver.

I am using SQL Server Stored Procedure in sending email, I'd like to have it with a url link and when the approver clicks the link, it will direct him to the page with QUERYSTRING in the URL containing the Transaction (@trxnum).

If the approver is not logged in, he will be directed to Google Authentication login page, how can I make it that when the approver logs in, he will be redirected to the same page/link in the email?

What I have tried:

Here is what I have so far, only the link of the page with the QUERYSTRING of the transaction.

Please click here to make an action'

But when the approver is not logged in and he is directed to the login page and signs in, he is presented with the default page instead of the link in the email.
Posted
Updated 7-Dec-16 23:21pm

1 solution

One solution is, Make the link such as on the landing page it checks if user logged in, if yes then redirect to that page if not fetch the redirect link to session and on sussessful login check if session has a value. If yes redirect there.
   
Comments
bjay tiamsic 8-Dec-16 18:27pm
   
I have done this technique before, I am just looking for more strategic approach. Thank you anyway. I will apply this for the meantime.
Er. Puneet Goel 27-Dec-16 6:36am
   
Please accept it as ans if you find this helpful.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900