Programmatically modifying an embedded resource before registering/referencing it on the page

Posted by Jimock on Stack Overflow See other posts from Stack Overflow or by Jimock
Published on 2010-03-05T15:37:37Z Indexed on 2010/03/24 9:33 UTC
Read the original article Hit count: 511

Filed under:
|
|
|

Hi All,

Firstly, "Modifying" may be the wrong term, I see a few people have posted online just asking whether they can actually modify an embedded resource. What I am wanting to to, is use a resource in my assembly as a kind of template which I would do a find and replace on before registering it on the page - is this possible?

For example; say I have a few lines of jQuery as an embedded resource in my assembly and in this script I am referencing a CSS class name that can be set by the front-end programmer. Since I do not know what the CSS class will be until implementation, is there a way of going through the embedded resource and replacing, say, $myclass$ with ThisClassName.

Any help would be appreciated, if it's not possible then at least tell me so I can stop chasing my tail.

Cheers, James

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET