我在 asp.net mvc 4 中做了一个简单的应用程序
我制作了一个随机链接,并将随机链接发送到电子邮件.. 当我点击电子邮件中的链接时,它将重定向到 www.google.com
我的问题是,如果我点击电子邮件中的链接,我不会重定向到 www.google.com
我怎样才能解决我的问题?
这是我的代码
public ActionResult Index(alamatWeb alamatweb)
{
var encryptText = MyEncryptDecript.Library.lockIt.EnString("a");
var clearText = MyEncryptDecript.Library.lockIt.DeString(encryptText);
ViewBag.encrypt = encryptText;
ViewBag.decrypt = clearText;
PasswordRandom x = new PasswordRandom();
string paswordacak ="http://localhost:4466/User?UserID="+ x.GeneratePassword();
ViewBag.acak = paswordacak;
alamatweb.link = paswordacak;
alamatweb.referensi = "www.rajakamar.com";
url.alamatWebs.Add(alamatweb);
url.SaveChanges();
var c = (from d in url.alamatWebs
select d.link).First();
var aar = new tampilModel {
link = c
};
new MailController().SampleEmail(aar).Deliver();
return View();
}
public ActionResult User()
{
var e = (from a in url.alamatWebs
select a.link).ToList();
var c = (from d in url.alamatWebs
select d.link).First();
if (e.Any(u => u == c))
{
return Redirect("www.google.com");
}
return View();
}