Posted on 2009-12-16
Last Modified: 2012-06-27
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

Question by:lrbrister
    LVL 18

    Expert Comment

    by:Rajar Ahmed
    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


    Author Comment

    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
    LVL 22

    Accepted Solution

    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

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    ASP.NET C# delay answer writing to file 11 30
    C# Winform panel within a panel 4 31
    Xamarin 10 19
    Problem to ToolkitScriptManager 2 0
    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now