本文介绍了URLRewriting时不会加载图片和Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! Hello All, 我的所有CSS和Java脚本链接都在Master Page中,并使用Application_BeginRequest重写Url。 网址: localhost:49296 / SiteName / 12 / ProductName to localhost:49296 / SiteName / Post.aspx?id = 12 在Post.aspx中图像和JS不可用! CSS工作正常 - < link href =〜/ css / style.css =stylesheettype =text / css/> 但是JQuary已经不见了: < script type =text / javascriptsrc =script / jquery.leanModal.min.js>< / script> 请帮助解决方案 尝试: < script type = text / javascript src = <% = Page.ResolveUrl( 〜/ script / jquery.leanModal.min.js )%> > < / script > Hello All,I have My all CSS and Java scripts links are in Master Page, and rewriting Url Using Application_BeginRequest.URL:localhost:49296/SiteName/12/ProductNametolocalhost:49296/SiteName/Post.aspx?id=12In Post.aspx Images and JS are not available !CSS is working properly-<link href="~/css/style.css" rel="stylesheet" type="text/css" />but JQuary is gone :<script type="text/javascript" src="script/jquery.leanModal.min.js"></script>Please help 解决方案 Try:<script type="text/javascript" src="<%= Page.ResolveUrl("~/script/jquery.leanModal.min.js") %>"></script> 这篇关于URLRewriting时不会加载图片和Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-31 06:52