Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dynamic table using string builder issue
- StringBuilder Builder = new StringBuilder();
- Builder.Append(@"<table border=1;").Append("id=Tableid;").Append("onclick=GetchildDiv()>").Append("<tr><td>").Append(Mainrow["Title"]).Append("</td></tr></table>");
- Builder.Append(@"<table border=""1"" ")
- .Append("id="Tableid" ")
- .Append(""onclick=GetchildDiv();">")
- .Append("<tr><td>")
- .Append(Mainrow["Title"])
- .Append("</td></tr></table>");
- Builder.Append(@"<table border=""1"" id=""Tableid"" onclick=""GetchildDiv();"">")
- Builder.AppendFormat(@"<tr><td>{0}</td></tr></table>", Mainrow["Title"]);
- Builder
- .Append(@"<table border=1 ") // remove semi-colon and add space
- .Append("id=Tableid ") // remove semi-colon and add space
- .Append("onclick="GetchildDiv();">") // wrap the function-name by "
- .Append("<tr><td>")
- .Append(Mainrow["Title"])
- .Append("</td></tr></table>");
- System.Text.StringBuilder Builder = new System.Text.StringBuilder();
- Builder.Append("<table border="1" ").
- Append("id="Tableid" ").
- Append("onclick="GetchildDiv()">").
- Append("<tr><td>").
- Append(Mainrow["Title"]).
- Append("</td></tr></table>");
Add Comment
Please, Sign In to add comment