Server Control

Discussion in 'ASP .Net' started by Eric, Oct 6, 2004.

  1. Eric

    Eric Guest

    Hi,

    I have a strange behaviour with my Server Control.
    An easy one:
    public class SystemInfo : System.Web.UI.WebControls.WebControl

    {

    //protected override void Render(HtmlTextWriter output)

    { output.Write(""); ...}

    }

    No more than that.

    The strange thing is, when I use this one on an ASPX page, it works with a
    normal browser like IE6 with WinXP.

    But when I navigate with my Ipaq (Mobile Browser) to this page, I get an
    exception:

    Unhandled Execution Error
    Object reference not set to an instance of an object.
    at Bluesware.Library.Web.SystemInfo.Render(HtmlTextWriter output)
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
    at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
    at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter
    writer)
    at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
    at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
    at System.Web.UI.Control.Render(HtmlTextWriter writer)
    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
    at System.Web.UI.Page.ProcessRequestMain()




    There shouldn't be a difference if I call this page with IE6 or PocketIE?

    The rendering should work same (We are still not in ASP.NET V2).

    Or I'm missing something?

    Thanks

    Eric
     
    Eric, Oct 6, 2004
    #1
    1. Advertising

  2. Eric

    Eric Guest

    I have found the problem.

    There was an exception inside the Render function, which led to this
    NullPointerException.

    Eric

    "Eric" <> wrote in message
    news:#...
    > Hi,
    >
    > I have a strange behaviour with my Server Control.
    > An easy one:
    > public class SystemInfo : System.Web.UI.WebControls.WebControl
    >
    > {
    >
    > //protected override void Render(HtmlTextWriter output)
    >
    > { output.Write(""); ...}
    >
    > }
    >
    > No more than that.
    >
    > The strange thing is, when I use this one on an ASPX page, it works with a
    > normal browser like IE6 with WinXP.
    >
    > But when I navigate with my Ipaq (Mobile Browser) to this page, I get an
    > exception:
    >
    > Unhandled Execution Error
    > Object reference not set to an instance of an object.
    > at Bluesware.Library.Web.SystemInfo.Render(HtmlTextWriter output)
    > at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
    > at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
    > at

    System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter
    > writer)
    > at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter

    output)
    > at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
    > at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
    > at System.Web.UI.Control.Render(HtmlTextWriter writer)
    > at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
    > at System.Web.UI.Page.ProcessRequestMain()
    >
    >
    >
    >
    > There shouldn't be a difference if I call this page with IE6 or PocketIE?
    >
    > The rendering should work same (We are still not in ASP.NET V2).
    >
    > Or I'm missing something?
    >
    > Thanks
    >
    > Eric
    >
    >
    >
    >
    >
    >
     
    Eric, Oct 6, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthew Louden
    Replies:
    1
    Views:
    7,114
    Scott M.
    Oct 11, 2003
  2. =?Utf-8?B?UGVyZG8=?=
    Replies:
    0
    Views:
    602
    =?Utf-8?B?UGVyZG8=?=
    Feb 6, 2004
  3. Mythran
    Replies:
    2
    Views:
    549
    Mythran
    Jan 22, 2005
  4. -
    Replies:
    2
    Views:
    451
    Alan Krueger
    Jul 29, 2005
  5. Tim
    Replies:
    0
    Views:
    214
Loading...

Share This Page