문제

I'm attempting to replace a pattern in all my .aspx and .ascx file when I Publish my Webapplication.

When I am running the application locally, I don't care about the replace. But as soon as I need to Publish the solution I need a sequence of characters, let's say "ABC", replaced with "DEF" in all my .aspx and .ascx files.

How would I go about performing this?

도움이 되었습니까?

해결책

You should create a separate script, that goes through your folder searching and loading all your .aspx and .ascx files, open them and replace all the needed stuff. I don't know how to do it in asp, but in actionscript it would look like fileText = fileText.replace(/ABC/g,"DEF");

다른 팁

perl -p -i -e 's/ABC/EDF/g' *.aspx

perl -p -i -e 's/ABC/EDF/g' *.ascx

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top