日期:2014-05-19  浏览次数:20586 次

如何调试输出变量或常量?
在.net中,如何像asp那样输出?如
dim   names
names= "test "
sql= "select   *   from   table   where   name= ' "%names% " ' "
response.write   sql


.net
string   names= "test ";
string   sql= "select   *   from   table   where   name= "+names;
//如何输出sql?顺便问上面的sql中where   后面有变量names这样写正确吗?

另外,.net有没有showmessages之类的?即弹出输出消息的?

------解决方案--------------------
string names= "test ";
string sql= "select * from table where name= "+names;
Response.Write( sql );
------解决方案--------------------
sql= "select * from table where name= '% "+变量+ "% ' "
Response.Write ( " <script> alert( ' "+变量+ " '); </script> ")