In my MVC application,@Html.ActionLink
control works fine in my local machine. The actionlink redirects to the specified action. But when hosted in server, error "Resource not found. Please check the url" occurs.
View Code
@Html.ActionLink(" ", "ExportToQR", "WPCheckout", new { UserID = Request.QueryString["UserID"], Partnerid = Request.QueryString["Partnerid"] }, new { @class = "btnMakeQR" })
Class for button Image
.btnMakeQR
{
background: url(../Images/Generate_QR_Code.png) no-repeat top left;
display: block;
width: 111px;
height: 25px;
text-indent: -9999px;
}
Controller Code
public class WPCheckoutController : Controller
{
public ActionResult ExportToQR()
{
// logic to get encoding value for "qrcode" from database
QRCodeEncoder encoder = new QRCodeEncoder();
Bitmap img = encoder.Encode(qrcode);
string path = Server.MapPath(@"/Images/QRCode.jpg");
img.Save(path, ImageFormat.Jpeg);
return base.File(path,"image/jpeg","OrderDetails.jpg");
}
}
What is the mistake in my code. ?. Any suggestions.
EDIT
This is the url, I get when hovering the button image.
http://localhost/WPCheckout/ExportToQR?UserID=1013&Partnerid=ph111