By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,375 Members | 1,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,375 IT Pros & Developers. It's quick & easy.

Response.write tool

P: n/a
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?
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
TJS
there's a vb tool here

http://www.aspkey.net/aspkey/_tools/asp/html2asp.asp

select "response.write" with a "forward" conversion

"Chris" <fr*******@surf.to> wrote in message
news:57**************************@posting.google.c om...
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?

Nov 18 '05 #2

P: n/a
I really need a C# .Net version but I could use this to get a step closer.
Thanks for that.

"TJS" <no****@here.com> wrote in message news:<OX**************@TK2MSFTNGP09.phx.gbl>...
there's a vb tool here

http://www.aspkey.net/aspkey/_tools/asp/html2asp.asp

select "response.write" with a "forward" conversion

"Chris" <fr*******@surf.to> wrote in message
news:57**************************@posting.google.c om...
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?

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.