don't understand error

Discussion in 'ASP .Net' started by m miller, Jan 9, 2004.

  1. m miller

    m miller Guest

    ..NET 2003, Win XP and Win 2000 Pro, IE 6.0 SP1

    I have a webform with a button, an html input a dropdown list and a data
    grid. Users may use the drop down to choose a part number which then
    posts back to the input and populates the grid.

    In testing I can choose about 20 or 30 part numbers and all works well.
    Then, all of a sudden, I get an app error:

    Control 'dgOnHand__ctl1_ctl1' of type 'DataGridLinkButton' must be placed
    inside a form tag with runat=server

    I don't have a DataGridLinkButton, nor can I find any references to one.

    I'm really curious as to what this is all about.

    Thanks,
    m miller
    m miller, Jan 9, 2004
    #1
    1. Advertising

  2. m miller

    Alvin Bruney Guest

    open your aspx page in html view. you will find that the control it is
    complaining about appears after the closing form tag </form>
    just move it inside the closing form tag and that should fix the problem for
    you. it's a vs bug in the way vs rewrites a dirty aspx page.

    --
    Regards,
    Alvin Bruney
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "m miller" <> wrote in message
    news:...
    > .NET 2003, Win XP and Win 2000 Pro, IE 6.0 SP1
    >
    > I have a webform with a button, an html input a dropdown list and a data
    > grid. Users may use the drop down to choose a part number which then
    > posts back to the input and populates the grid.
    >
    > In testing I can choose about 20 or 30 part numbers and all works well.
    > Then, all of a sudden, I get an app error:
    >
    > Control 'dgOnHand__ctl1_ctl1' of type 'DataGridLinkButton' must be placed
    > inside a form tag with runat=server
    >
    > I don't have a DataGridLinkButton, nor can I find any references to one.
    >
    > I'm really curious as to what this is all about.
    >
    > Thanks,
    > m miller
    >
    >
    Alvin Bruney, Jan 9, 2004
    #2
    1. Advertising

  3. m miller

    Philip Rieck Guest

    if your datagrid has a <asp:ButtonColumn type="LinkButton"> in it, then the
    datagrid is generating a DataGridLinkButton for you.

    Most likely, this is due to the VS bug that places items outside a </form>
    tag sometimes.

    Open up your aspx file for this page in design view (not code view)
    Click the "HTML" button just below the page, if "Design" is currently
    selected.
    Find your </form> tag, and make sure that it is AFTER all controls on your
    page (it should probably have only </body></html> after it)

    Now try your app.


    "m miller" <> wrote in message
    news:...
    > .NET 2003, Win XP and Win 2000 Pro, IE 6.0 SP1
    >
    > I have a webform with a button, an html input a dropdown list and a data
    > grid. Users may use the drop down to choose a part number which then
    > posts back to the input and populates the grid.
    >
    > In testing I can choose about 20 or 30 part numbers and all works well.
    > Then, all of a sudden, I get an app error:
    >
    > Control 'dgOnHand__ctl1_ctl1' of type 'DataGridLinkButton' must be placed
    > inside a form tag with runat=server
    >
    > I don't have a DataGridLinkButton, nor can I find any references to one.
    >
    > I'm really curious as to what this is all about.
    >
    > Thanks,
    > m miller
    >
    >
    Philip Rieck, Jan 9, 2004
    #3
  4. Hi m miller,


    Thank you for using Microsoft newsgroup Service. Based on your description,
    when you run a page with some button, dropdownlist and DataGrid controls,
    you encountered a error like:
    Control 'dgOnHand__ctl1_ctl1' of type 'DataGridLinkButton' must be placed
    inside a form tag with runat=server

    As for this problem, I agree to Alvin and Philip 's suggestions. This is
    most likely caused by some control element is put outside the <form ...
    runat=server> 's </form> tag. You may have a check in the page's html
    source as Alvin or Philip suggested. If you need any further assistant,
    please feel free to post here.



    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    Steven Cheng[MSFT], Jan 10, 2004
    #4
  5. m miller

    smitdso

    Joined:
    Sep 8, 2006
    Messages:
    4
    I am facing the same problem but the form tag in design mode is just fine.

    Please help
    smitdso, Sep 8, 2006
    #5
    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. simon

    Error message I don't understand

    simon, Dec 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    307
    Hatim R
    Dec 5, 2003
  2. Wayne  Wengert

    Don't Understand This error?

    Wayne Wengert, Mar 3, 2005, in forum: ASP .Net
    Replies:
    10
    Views:
    1,095
    George Christopher
    Jan 4, 2006
  3. Wayne Wengert

    Don't Understand error

    Wayne Wengert, Nov 26, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    455
    Wayne Wengert
    Dec 4, 2005
  4. Tobias Langner

    compiler error I don't understand

    Tobias Langner, Aug 1, 2003, in forum: C++
    Replies:
    7
    Views:
    321
    Jakob Bieling
    Aug 1, 2003
  5. Chris Saunders

    Don't understand syntax error

    Chris Saunders, May 16, 2005, in forum: C Programming
    Replies:
    9
    Views:
    462
    CBFalconer
    May 17, 2005
Loading...

Share This Page