aresung Posted October 22, 2008 Posted October 22, 2008 Developed a web application in ASP.Net (Framework 1.0), in which I have used public variable which is defined in the aspx page and in the code behind will have some calculations and the assign some value to that variable. Example: reports.aspx ..... <TABLE cellSpacing="2" cellPadding="0" width="700" align="center"> <%=tstrHTML%> </TABLE> ..... reports.aspx.vb private void displayReports() { tstrHTML = "<tr><td align=left>First Name</td>" & _ "<td align=left>Last Name</td>" & _ "<td align=left>Salary</td>" tstrHTML += "<tr><td align=left>Binny</td>" & _ "<td align=left>Federal</td>" & _ "<td align=left>230000</td>" } The application was running fine for the last couple of years and all of a sudden having some problem. Can any one of you help me on figuring out this issue. Thanks Quote
Diesel Posted October 24, 2008 Posted October 24, 2008 What is the error message? Nothing is being displayed in the table? From the snippet you posted, I can tell you need to end your table rows.... "<td align=left>Salary</td></tr>" "<td align=left>230000</td></tr>" You didn't post the declaration of tstrHTML,but it should have a scope of at least Friend. Quote
John_0025 Posted October 29, 2008 Posted October 29, 2008 What is the error message? Nothing is being displayed in the table? From the snippet you posted, I can tell you need to end your table rows.... "<td align=left>Salary</td></tr>" "<td align=left>230000</td></tr>" You didn't post the declaration of tstrHTML,but it should have a scope of at least Friend. Yep think you need to include the tstrHTML declaration and where displayReports is called. As an aside both the </td> and </tr> tags are optional. You can save a bit of bandwidth by not including them. However, I always use them myself. Quote
Diesel Posted October 29, 2008 Posted October 29, 2008 Optional? Blasphemy! In what html spec are you talking about, 4.01? Welcome to the future, welcome to Xhtml. Quote
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.