HtmlTextWriter

Getting an Error Message on code below....
Dim writer As System.Web.UI.HtmlTextWriter
        writer.Write("      <table><tr>")
        writer.Write("        <td width=""25%"" align=""right"" valign=""middle"">Assign PointMan ID:</td>")
        writer.Write("        <td width=""75%"" align=""left"" valign=""middle"">ptmn0")
        writer.Write("        </td>")
        writer.Write("      </tr></table>")

Open in new window

Larry Bristersr. DeveloperAsked:
Who is Participating?
 
Snarf0001Connect With a Mentor Commented:
Whats the error message?  Wondering if it's a null object error or something along those lines...
try adding "new":

Dim writer As New System.Web.UI.HtmlTextWriter
0
 
Rajar AhmedConsultantCommented:
how abt this ???  

       
Response.Write("      <table><tr>")
        Response.Write("        <td width=""25%"" align=""right"" valign=""middle"">Assign PointMan ID:</td>")
        Response.Write("        <td width=""75%"" align=""left"" valign=""middle"">ptmn0")
        Response.Write("        </td>")
        Response.Write("      </tr></table>")

Open in new window

0
 
Larry Bristersr. DeveloperAuthor Commented:
meeran03:
The code I have above is from an existing project that I've taken over.  i HAVE to use the writer.write on new pages and I can't for the life of me figure out why this isn't working
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.