custom control works, but wont display in design time

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default custom control works, but wont display in design time

    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 Guest

  2. Similar Questions and Discussions

    1. Custom Web Control Design-Time Property
      Hi!! I´m writing a custom control. It´s working OK. I´ve added the Editor atribute to one of it´t properties and it works OK when the property...
    2. Rendering Custom Control during design time
      Hi, I have been creating simple custom controls that is able to be added to the Visual Studio toolbox and drag & drop to my aspx pages. The main...
    3. Custom Control Debugging - Design Time!
      Greetings & Salutations, I have already scanned the posts for my problem & have found a couple that deal with problems that have the exact same...
    4. q: 'composite' control: works fine, but no children @ design time ?
      Hi All ! I have my control, which populates inner ControlCollection via custom control builder and AddParsedSubObject function. Everything works...
    5. Using Table control in a custom composite control. Control does not render properly in design time.
      All, I have written a very simple custom composite control that includes a control of type System.Web.UI.WebControls.Table. The control...
  3. #2

    Default Re: custom control works, but wont display in design time

    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
    lisa@starways.net Guest

  4. #3

    Default Re: custom control works, but wont display in design time

    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 Guest

  5. #4

    Default Re: custom control works, but wont display in design time

    You should probably create a designer, as demonstrated near the bottom of
    this article:
    [url]http://SteveOrr.net/articles/BarGraphs.aspx[/url]

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


    "B. Rubble" <rahkim@hotmail.com> wrote in message
    news:1115913215.492427.81990@g49g2000cwa.googlegro ups.com...
    > 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] Guest

  6. #5

    Default Re: custom control works, but wont display in design time

    Thanks! I will check it out.

    xX B. Rubble Xx

    B. Rubble Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139