Click here to Skip to main content
15,910,471 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i am sending mails from asp.net to diffrent user

in that mail i am putting links on clicking them user will be redirected to some thirdparty websites can be any websites

i want to track whether link has been clicked by the user or not

can anyone please let me know how do i achieve it
Posted
Comments
Mukesh Ghosh 8-Jul-13 2:08am    
Are you using MVC ? It can be done easily with that.
surajemo 8-Jul-13 2:32am    
no i am not using MVC

See there no way to track that.
You can do a trick.
1. First attach a query string with the link
2. Then redirect to your page & when user click that link it should redirect tot your page
& in code level check the query string & redirect automatically to desire link.

Click On Link---->Your own page---> Desire webpage (Say Google)
 
Share this answer
 
Comments
surajemo 8-Jul-13 3:25am    
ok i will try this :)
surajemo 8-Jul-13 3:40am    
cool it s working thank u Mukesh
If you want to execute server code upon a click in a link, then you should use the ASP.NET control <asp:LinkButton>
XML
if it is LinkButton you can do it inside onclick event

<asp:LinkButton ID="MyLnkButton" runat="server" onClick="MyLnkButton_Click" Text="Click Me!">

protected void MyLnkButton_Click(Object sender,EventArgs e)
{
   Response.Redirect("Default.aspx");
}
 
Share this answer
 
Comments
Nirav Prabtani 8-Jul-13 2:14am    
How can i know that user has visited link or not????
Mukesh Ghosh 8-Jul-13 2:24am    
Do you have any privilege to work on 3rd Party website?
Like in case you can create a web siervice, which is acknowledged when user visit to that site.
surajemo 8-Jul-13 2:36am    
no i don't have privilege to work on 3rd Party website what i am making is an marketing engine
so email will be made by user he or she can add any link to any location i want to track how many users have clicked the link in the email so that i can show them in the report this person has clicked the link in the mail
Mukesh Ghosh 8-Jul-13 2:41am    
Well if you user add a link to site you can track by solution 1.
Do you find issue on this?
surajemo 8-Jul-13 2:49am    
mukesh what i am making is an marketing engine so the user will be sending promotional email's to his customers so the user who is sending the mail will be adding links which goes to different websites i want to know has which customer has clicked the link

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