Response.write tool

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi,

Is there a macro or add-on to Visual Studio.net that can easily
convert HTML to response.write statements with any "s escaped?
Handling <%=string%> inline script as concatenation would be helpful
too as I have an old ASP site to update that uses a lot of these in
functions. So you could highlight multiple lines like the following in
Visual Studio

<H2>An error has occured</H2>
<SPAN class="error"><%=sError%></SPAN>

click convert and get

Response.write("<H2>An error has occured</H2>\n") ;
Response.write("<SPAN class=\"error\">" + sError + "</SPAN>\n") ;

in C# or the equivalent VB etc,. This must be such a common task that
not having to paste Response.write and closing ) ; on every line would
make this very useful.

I don't know much about macros but could I create one to do this?
 
I really need a C# .Net version but I could use this to get a step closer.
Thanks for that.
 
Back
Top