Hi,
I want to implement a Jquery thickbox to show an image that is generated from my database in ASP.Net MVC. My link looks roughly like this:
<a href="<%=Url.Action("ShowPhoto", "Item", new { id = pic.pictureID }) %>" class="thickbox"><img src="<%= Url.Action( "ShowThumbnail", "Item", new { id = pic.pictureID } ) %>" alt="" width="100px" /></a>
However, I'm having errors popping out caused by the Url.Action link.
Someone please help me!!
EDIT: Sorry, I forgot to put the error in.
In the Visual Studio:
NullReferenceException was unhandled by user code. Object reference not set to an instance of an object. (This is highlighted in UnitofWork.CurrentUnitOfWork.Dispose();)
In my error log:
System.Web.HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (&). at System.Web.HttpRequest.ValidateInputIfRequiredByConfig() at System.Web.HttpApplication.ValidateRequestExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
System.Web.HttpException (0x80004005): File does not exist. at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response)
at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String overrideVirtualPath)
at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)