locked
ASP.Net/C# - Error in composite control when added to toolbox RRS feed

  • Question

  • User1526309702 posted
    hi
    i have created a composite control in a class library.
    when i am adding the control to my toolbox and drag it onto my aspx page i get an error message in the control saying Error Rendering Control: An unhandled exception occured. object not set to an instance of the object.

    What i am finding weird is that the control works fine but on my aspx page it has the error message which i mentioned above.

    thanks in advance for help
    <!-- / message -->
    Tuesday, June 10, 2008 8:53 AM

Answers

  • User1526309702 posted

    hi  thanks for your reply..

    I managed to sort the issue out.. I took out the override Render method which I had in my composite control and also put  my composite control in a placeholder on my aspx page. and its working smoothly...

    once again thanks ... for ur help... :)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 12, 2008 11:42 AM

All replies

  • User-1691609705 posted

    hi,

    could u post your code?  Also, are you overriding any of the render methods (onprerender, render, rendercontents)?

    regards
    shalan

    Tuesday, June 10, 2008 5:35 PM
  • User1526309702 posted

    hi  thanks for your reply..

    I managed to sort the issue out.. I took out the override Render method which I had in my composite control and also put  my composite control in a placeholder on my aspx page. and its working smoothly...

    once again thanks ... for ur help... :)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, June 12, 2008 11:42 AM