custom control works, but wont display in design time

Discussion in 'ASP .Net Building Controls' started by B. Rubble, May 12, 2005.

  1. B. Rubble

    B. Rubble Guest

    Hello all,

    I recently created a custom control in c#. The control inherits from
    the datagrid. I included a reference to the dll in a web project, and
    put a copy of the dll in the bin folder of the web directory. I then
    added it to the toolbox by browsing to the dll on the add/remove items
    dialog. I then dragged the control icon onto my webform. A little
    gray box with error is displayed that says there is a parser error.
    However, if I manually register the control in the html, and then use
    the basic syntax of a datagrid and insert it on the page, changing the
    main tag to match the registration for the control, a datagrid is
    displayed on the design side...and the control works.

    My question is, how can I get my custom control to drag and drop onto
    the design and show a datagrid without having to manipulate the html
    before?

    Thanks for any help! Ive been working on this for hours. Frustrating
    how the control works, but wont show up in design time.

    xX B. Rubble Xx
     
    B. Rubble, May 12, 2005
    #1
    1. Advertising

  2. B. Rubble

    Guest

    Barney,

    Have you made a custom designer?

    Lisa


    B. Rubble wrote:
    > Hello all,
    >
    > I recently created a custom control in c#. The control inherits from
    > the datagrid. I included a reference to the dll in a web project,

    and
    > put a copy of the dll in the bin folder of the web directory. I then
    > added it to the toolbox by browsing to the dll on the add/remove

    items
    > dialog. I then dragged the control icon onto my webform. A little
    > gray box with error is displayed that says there is a parser error.
    > However, if I manually register the control in the html, and then use
    > the basic syntax of a datagrid and insert it on the page, changing

    the
    > main tag to match the registration for the control, a datagrid is
    > displayed on the design side...and the control works.
    >
    > My question is, how can I get my custom control to drag and drop onto
    > the design and show a datagrid without having to manipulate the html
    > before?
    >
    > Thanks for any help! Ive been working on this for hours.

    Frustrating
    > how the control works, but wont show up in design time.
    >
    > xX B. Rubble Xx
     
    , May 12, 2005
    #2
    1. Advertising

  3. B. Rubble

    B. Rubble Guest

    Custom Designer?? I dont believe I have. Absence of this would cause
    my control to show a parser error in design time? How do I go about
    creating a custom designer? I thought the fact that it was inherited
    from the datagrid class would be enough.

    Thanks!
    xX B. Rubble Xx
     
    B. Rubble, May 12, 2005
    #3
  4. You should probably create a designer, as demonstrated near the bottom of
    this article:
    http://SteveOrr.net/articles/BarGraphs.aspx

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "B. Rubble" <> wrote in message
    news:...
    > Hello all,
    >
    > I recently created a custom control in c#. The control inherits from
    > the datagrid. I included a reference to the dll in a web project, and
    > put a copy of the dll in the bin folder of the web directory. I then
    > added it to the toolbox by browsing to the dll on the add/remove items
    > dialog. I then dragged the control icon onto my webform. A little
    > gray box with error is displayed that says there is a parser error.
    > However, if I manually register the control in the html, and then use
    > the basic syntax of a datagrid and insert it on the page, changing the
    > main tag to match the registration for the control, a datagrid is
    > displayed on the design side...and the control works.
    >
    > My question is, how can I get my custom control to drag and drop onto
    > the design and show a datagrid without having to manipulate the html
    > before?
    >
    > Thanks for any help! Ive been working on this for hours. Frustrating
    > how the control works, but wont show up in design time.
    >
    > xX B. Rubble Xx
    >
     
    Steve C. Orr [MVP, MCSD], May 13, 2005
    #4
  5. B. Rubble

    B. Rubble Guest

    Thanks! I will check it out.

    xX B. Rubble Xx
     
    B. Rubble, May 18, 2005
    #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. Replies:
    0
    Views:
    732
  2. Chubby Arse
    Replies:
    0
    Views:
    570
    Chubby Arse
    Oct 6, 2005
  3. Replies:
    1
    Views:
    396
    Teemu Keiski
    Jul 2, 2003
  4. John Rebbeck

    Custom Server Control works on page but not User Control...why?

    John Rebbeck, Sep 16, 2003, in forum: ASP .Net Building Controls
    Replies:
    3
    Views:
    198
    John Rebbeck
    Sep 17, 2003
  5. Juri Zenkevitch

    q: 'composite' control: works fine, but no children @ design time ?

    Juri Zenkevitch, Apr 7, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    154
    Juri Zenkevitch
    Apr 7, 2004
Loading...

Share This Page