ASP.NET MVC:生成缩略图时出现问题...需要帮助!
好的,我是 ASP.NET MVC 新手,我正在尝试制作一个 Web 应用程序照片库。我已经在这里发布过一次关于这个问题的文章,我试图在页面上动态生成缩略图而不是实际的全尺寸图像。基本上,我正在寻找的功能是能够在页面上显示缩略图,然后能够单击图像以查看全尺寸版本。我正在从 XML 文件中提取图像和图像信息。所以,我这样做是为了动态显示它们,这样以后进行更改会更容易。稍后,我将添加将新图像上传到特定画廊的功能(当我弄清楚如何做到这一点时)。我提供了一个下载我正在开发的项目的链接,以便您可以查看代码。我将不胜感激任何帮助!谢谢! 项目 URL:http://www.diminished4th.com/TestArtist.zip 瑞安
Ok, so i'm new to asp.net mvc and i'm trying to make a web application photo gallery. I've posted once on here about this issue i am having of trying to generate thumbnails on-the-fly on the page instead of the actual full-size images. Basically, the functionality i am looking for is to be able to have thumbnails on the page and then be able to click the images to see the full-size version. I am pulling the images and images info from an XML file. So, i did this so i could display them dynamically and so it would be easier to make changes later. Later, i am going to add functionality to upload new images to specific galleries (when i figure out how to do that as well). I am providing a link to download the project i am working on so you can see the code. I would appreciate any help with this! Thanks!
URL to project: http://www.diminished4th.com/TestArtist.zip
Ryan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的 global.asax.cs 文件中,您已在 Thumbs 路由之前定义了 Default 路由,因此 url 的 Galleries 部分会映射到不存在的 Galleries 控制器Gallery 控制器的(如第二个路由中指定的):
只需在 Default 路由之前定义 Thumbs 路由,就可以了:
In your global.asax.cs file, you have defined the Default route before your Thumbs route so the Galleries part of the url is mapped to a non-existent Galleries controller instead of the Gallery controller (as specified in your second route):
Simply define the Thumbs route before the Default route and you should be all good: