Embedded views and resources (mvc)
Posted
by Steve Ward
on Stack Overflow
See other posts from Stack Overflow
or by Steve Ward
Published on 2010-03-25T05:59:47Z
Indexed on
2010/03/25
6:03 UTC
Read the original article
Hit count: 583
Hi
I've embedded several views in a library so that I can re-use across projects using this method which works OK:
http://www.wynia.org/wordpress/2008/12/aspnet-mvc-plugins/
But one view usings a Javascript file. I've tried marking this as an embedded resource and adding it AssemblyInfo.cs and then referencing this resource using
<%= ClientScript.GetWebResourceUrl(this.GetType(), "FullPath.FileName.js")%>
This is literally displaying this output in the view
WebResource.axd?d=nUxqfqAUQLabLU54W
I think this is because Im trying to refer to an embedded resource from an embedded resource.
Help appreciated as Im going round in circles..
Steve
© Stack Overflow or respective owner