Can't reference asp.net controls in old pages

Last post 04-03-2009 8:07 AM by utlandsfantomenno1. 1 replies.

Sort Posts:

  • Can't reference asp.net controls in old pages

    04-03-2009, 6:02 AM

    Hello,

    I can't reference old controls, like textboxes from code-behind in pages that was converted from asp.net 1.

    If I drag in a new control to the page I can reference it as usual, but if I try to use the old controls already declared in the .aspx page I get a "object reference not set..." exception. Why is this and how do I make it work without deleting the old controls and dragging in new ones and then naming them like the old ones.

    The markup for the "new" and "old" controls look the same in the .aspx page, but somewhere I have to make Net understand that the "old" controls are actually in the page.

    How?

    Cheers!

     /Eskil

  • Re: Can't reference asp.net controls in old pages

    04-03-2009, 8:07 AM
    Answer

    There was a namepspace wrapping the page class..taking it away solved my problems.

    Cheers!

    /Eskil

Page 1 of 1 (2 items)