can i by any means display the sql query executed in the asp .net using Response.Write( ) [except for the Response.Write( "select * from t1;")];]
asp.net : c# : sql
Collapse
X
-
Tags: None
-
I would advise against using Response.Write because it writes to the Output Stream sent to the browser. This could result in undesired results. For example the output could be written outside of your <html> tags using Response.Write making your webpage invalid.Originally posted by vishalguptacan i by any means display the sql query executed in the asp .net using Response.Write( ) [except for the Response.Write( "select * from t1;")];]
Use a Label, Localize, Textbox or some other control to display your output.
I'm not sure what you are trying to do.
Could you please explain your problem in more detail.
Thanks
-Frinny -
It depends. If your sql query returns a single value Response.Write will work just fine. However, if your sql query contains tabular data you will need to create a datatable or dataset and loop through the rows/columns of the table to output the data using Response.Write( ). It would be much easier to create a datagrid and output the data that way instead of using Response.Write.Originally posted by vishalguptacan i by any means display the sql query executed in the asp .net using Response.Write( ) [except for the Response.Write( "select * from t1;")];]
NathanComment
Comment