joe_pool_is Posted April 2, 2008 Posted April 2, 2008 Is there a way to get my ASP responses to output to a <div> tag? In my code, if there is an error or if I just want to view the data, I simply write to the screen with Response.Write(data). The trouble is, this looks tacky! Expecially if your customer happens to see it before you have cleaned it up. I'd like to have the response write to a <div> tag, instead. Then, the <div> tag can be visible only while I am debugging. Also, if I ever have to do work on the code later, make the <div> tag visible again, and off I go! Quote Avoid Sears Home Improvement
davearia Posted April 4, 2008 Posted April 4, 2008 What about using this for your div on the load event: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load divTest.Visible = HttpContext.Current.IsDebuggingEnabled End Sub Quote
joe_pool_is Posted April 4, 2008 Author Posted April 4, 2008 Hi Davearia, Actually, I'm not even worried about determining whether or not I am in debug mode. I can just set the <div> tag to size zero or position it off screen. I want to know how to tell a <%=Response.Write(value)%> to be directed to a <div> tag. I may have found a way, though. Right now I have an Asp Lable in my <div> tag, and all errors are appended to that label. I just didn't think of that route before. Quote Avoid Sears Home Improvement
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.