Custom control won't drag and drop to page

Discussion in 'ASP .Net Building Controls' started by Andrea Williams, Mar 29, 2005.

  1. i'm a bit of a noob to custom controls, so please bare with me...

    I just downloaded source to a control from thecodeproject.com but I'm unable
    to drag and drop the control from my toolbox to the design mode of my ascx
    file. According to the docs, I should be able to do just that. Is there
    something special that I have to do to get a custom control to drag and drop
    into my page? Some sort of setting or something that I haven't included in
    the VS.NET option?

    Thanks,
    Andrea
     
    Andrea Williams, Mar 29, 2005
    #1
    1. Advertising

  2. Are you getting some kind of error message?

    Here are some working examples of custom controls that can be successfully
    dropped from the toolbar:
    http://steveorr.net/articles/InheritAndExtend.aspx
    http://steveorr.net/articles/StreamingMedia.aspx

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



    "Andrea Williams" <> wrote in message
    news:%...
    > i'm a bit of a noob to custom controls, so please bare with me...
    >
    > I just downloaded source to a control from thecodeproject.com but I'm
    > unable
    > to drag and drop the control from my toolbox to the design mode of my ascx
    > file. According to the docs, I should be able to do just that. Is there
    > something special that I have to do to get a custom control to drag and
    > drop
    > into my page? Some sort of setting or something that I haven't included
    > in
    > the VS.NET option?
    >
    > Thanks,
    > Andrea
    >
    >
     
    Steve C. Orr [MVP, MCSD], Mar 29, 2005
    #2
    1. Advertising

  3. No, no error... When I try to drag and drop, the cursor turns to the no
    sign as if it's not a control that can be dropped.

    It's the control from this article:
    http://www.codeproject.com/useritems/OverlibWrapper.asp

    Meanwhile I'll try the controls you suggest.

    Andrea

    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > Are you getting some kind of error message?
    >
    > Here are some working examples of custom controls that can be successfully
    > dropped from the toolbar:
    > http://steveorr.net/articles/InheritAndExtend.aspx
    > http://steveorr.net/articles/StreamingMedia.aspx
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    >
    > "Andrea Williams" <> wrote in message
    > news:%...
    > > i'm a bit of a noob to custom controls, so please bare with me...
    > >
    > > I just downloaded source to a control from thecodeproject.com but I'm
    > > unable
    > > to drag and drop the control from my toolbox to the design mode of my

    ascx
    > > file. According to the docs, I should be able to do just that. Is

    there
    > > something special that I have to do to get a custom control to drag and
    > > drop
    > > into my page? Some sort of setting or something that I haven't included
    > > in
    > > the VS.NET option?
    > >
    > > Thanks,
    > > Andrea
    > >
    > >

    >
    >
     
    Andrea Williams, Mar 29, 2005
    #3
  4. I tried the first link and it is not drag and dropping either. So maybe I'm
    adding it to the toolbar incorrectly? Are there an instructions to add
    them?

    Andrea

    "Andrea Williams" <> wrote in message
    news:%...
    > i'm a bit of a noob to custom controls, so please bare with me...
    >
    > I just downloaded source to a control from thecodeproject.com but I'm

    unable
    > to drag and drop the control from my toolbox to the design mode of my ascx
    > file. According to the docs, I should be able to do just that. Is there
    > something special that I have to do to get a custom control to drag and

    drop
    > into my page? Some sort of setting or something that I haven't included

    in
    > the VS.NET option?
    >
    > Thanks,
    > Andrea
    >
    >
     
    Andrea Williams, Mar 29, 2005
    #4
  5. I just noticed that all the system control are in the GAC... Do I need to
    add them to the GAC?

    Andrea

    "Andrea Williams" <> wrote in message
    news:%...
    > No, no error... When I try to drag and drop, the cursor turns to the no
    > sign as if it's not a control that can be dropped.
    >
    > It's the control from this article:
    > http://www.codeproject.com/useritems/OverlibWrapper.asp
    >
    > Meanwhile I'll try the controls you suggest.
    >
    > Andrea
    >
    > "Steve C. Orr [MVP, MCSD]" <> wrote in message
    > news:...
    > > Are you getting some kind of error message?
    > >
    > > Here are some working examples of custom controls that can be

    successfully
    > > dropped from the toolbar:
    > > http://steveorr.net/articles/InheritAndExtend.aspx
    > > http://steveorr.net/articles/StreamingMedia.aspx
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD, MVP
    > > http://SteveOrr.net
    > >
    > >
    > >
    > > "Andrea Williams" <> wrote in message
    > > news:%...
    > > > i'm a bit of a noob to custom controls, so please bare with me...
    > > >
    > > > I just downloaded source to a control from thecodeproject.com but I'm
    > > > unable
    > > > to drag and drop the control from my toolbox to the design mode of my

    > ascx
    > > > file. According to the docs, I should be able to do just that. Is

    > there
    > > > something special that I have to do to get a custom control to drag

    and
    > > > drop
    > > > into my page? Some sort of setting or something that I haven't

    included
    > > > in
    > > > the VS.NET option?
    > > >
    > > > Thanks,
    > > > Andrea
    > > >
    > > >

    > >
    > >

    >
    >
     
    Andrea Williams, Mar 29, 2005
    #5
  6. Andrea Williams

    Brock Allen Guest

    I wonder if the control is actually being added to the page, but it shows
    no design time rendering. Check the underlying HTML for the control. It should
    look something like <cc:YourControlName runat=server ... />

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen



    > No, no error... When I try to drag and drop, the cursor turns to the
    > no sign as if it's not a control that can be dropped.
    >
    > It's the control from this article:
    > http://www.codeproject.com/useritems/OverlibWrapper.asp
    > Meanwhile I'll try the controls you suggest.
    >
    > Andrea
    >
    > "Steve C. Orr [MVP, MCSD]" <> wrote in message
    > news:...
    >
    >> Are you getting some kind of error message?
    >>
    >> Here are some working examples of custom controls that can be
    >> successfully dropped from the toolbar:
    >> http://steveorr.net/articles/InheritAndExtend.aspx
    >> http://steveorr.net/articles/StreamingMedia.aspx
    >>
    >> --
    >> I hope this helps,
    >> Steve C. Orr, MCSD, MVP
    >> http://SteveOrr.net
    >> "Andrea Williams" <> wrote in message
    >> news:%...
    >>
    >>> i'm a bit of a noob to custom controls, so please bare with me...
    >>>
    >>> I just downloaded source to a control from thecodeproject.com but
    >>> I'm
    >>> unable
    >>> to drag and drop the control from my toolbox to the design mode of
    >>> my

    > ascx
    >
    >>> file. According to the docs, I should be able to do just that. Is
    >>>

    > there
    >
    >>> something special that I have to do to get a custom control to drag
    >>> and
    >>> drop
    >>> into my page? Some sort of setting or something that I haven't
    >>> included
    >>> in
    >>> the VS.NET option?
    >>> Thanks,
    >>> Andrea
     
    Brock Allen, Mar 29, 2005
    #6
  7. No, custom controls don't need to be in the GAC.

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


    "Andrea Williams" <> wrote in message
    news:...
    >I just noticed that all the system control are in the GAC... Do I need to
    > add them to the GAC?
    >
    > Andrea
    >
    > "Andrea Williams" <> wrote in message
    > news:%...
    >> No, no error... When I try to drag and drop, the cursor turns to the no
    >> sign as if it's not a control that can be dropped.
    >>
    >> It's the control from this article:
    >> http://www.codeproject.com/useritems/OverlibWrapper.asp
    >>
    >> Meanwhile I'll try the controls you suggest.
    >>
    >> Andrea
    >>
    >> "Steve C. Orr [MVP, MCSD]" <> wrote in message
    >> news:...
    >> > Are you getting some kind of error message?
    >> >
    >> > Here are some working examples of custom controls that can be

    > successfully
    >> > dropped from the toolbar:
    >> > http://steveorr.net/articles/InheritAndExtend.aspx
    >> > http://steveorr.net/articles/StreamingMedia.aspx
    >> >
    >> > --
    >> > I hope this helps,
    >> > Steve C. Orr, MCSD, MVP
    >> > http://SteveOrr.net
    >> >
    >> >
    >> >
    >> > "Andrea Williams" <> wrote in message
    >> > news:%...
    >> > > i'm a bit of a noob to custom controls, so please bare with me...
    >> > >
    >> > > I just downloaded source to a control from thecodeproject.com but I'm
    >> > > unable
    >> > > to drag and drop the control from my toolbox to the design mode of my

    >> ascx
    >> > > file. According to the docs, I should be able to do just that. Is

    >> there
    >> > > something special that I have to do to get a custom control to drag

    > and
    >> > > drop
    >> > > into my page? Some sort of setting or something that I haven't

    > included
    >> > > in
    >> > > the VS.NET option?
    >> > >
    >> > > Thanks,
    >> > > Andrea
    >> > >
    >> > >
    >> >
    >> >

    >>
    >>

    >
    >
     
    Steve C. Orr [MVP, MCSD], Mar 29, 2005
    #7
  8. Nope, nothing is there. VS 2003 doesn't drop a thing. I can drag and drop
    my User Web controls from my project into the page... And the control block
    appears in that case.

    So I'm adding the control to the toolbar by right-click the toolbar and
    selecting "Add/ Remove Items..."
    On the .Net Tab I browse, find the dll in the BIN/Debug folder and select it
    and click OK. That puts the item on the toolbar. When the page is in
    design mode, the control looks to be enabled. I click and drag it... When
    the drag goes to the page (in design mode), the cursor changes from the bow
    and pointer to a circle with a line through it (No sign). I drop it anyway
    and nothing happens. No control in design mode and not text in HTML mode.

    Andrea


    "Brock Allen" <> wrote in message
    news:...
    > I wonder if the control is actually being added to the page, but it shows
    > no design time rendering. Check the underlying HTML for the control. It

    should
    > look something like <cc:YourControlName runat=server ... />
    >
    > -Brock
    > DevelopMentor
    > http://staff.develop.com/ballen
    >
    >
    >
    > > No, no error... When I try to drag and drop, the cursor turns to the
    > > no sign as if it's not a control that can be dropped.
    > >
    > > It's the control from this article:
    > > http://www.codeproject.com/useritems/OverlibWrapper.asp
    > > Meanwhile I'll try the controls you suggest.
    > >
    > > Andrea
    > >
    > > "Steve C. Orr [MVP, MCSD]" <> wrote in message
    > > news:...
    > >
    > >> Are you getting some kind of error message?
    > >>
    > >> Here are some working examples of custom controls that can be
    > >> successfully dropped from the toolbar:
    > >> http://steveorr.net/articles/InheritAndExtend.aspx
    > >> http://steveorr.net/articles/StreamingMedia.aspx
    > >>
    > >> --
    > >> I hope this helps,
    > >> Steve C. Orr, MCSD, MVP
    > >> http://SteveOrr.net
    > >> "Andrea Williams" <> wrote in message
    > >> news:%...
    > >>
    > >>> i'm a bit of a noob to custom controls, so please bare with me...
    > >>>
    > >>> I just downloaded source to a control from thecodeproject.com but
    > >>> I'm
    > >>> unable
    > >>> to drag and drop the control from my toolbox to the design mode of
    > >>> my

    > > ascx
    > >
    > >>> file. According to the docs, I should be able to do just that. Is
    > >>>

    > > there
    > >
    > >>> something special that I have to do to get a custom control to drag
    > >>> and
    > >>> drop
    > >>> into my page? Some sort of setting or something that I haven't
    > >>> included
    > >>> in
    > >>> the VS.NET option?
    > >>> Thanks,
    > >>> Andrea

    >
    >
    >
     
    Andrea Williams, Mar 29, 2005
    #8
  9. Andrea Williams

    Guest

    Most of the time when this happens it is because your UserControl is
    throwing an exception of some sort. There are a few occassions where
    this will just "happen" and creating a new web page or a new project
    usually solves it. In cases where it does not it is most likely because
    somewhere along the line the UserControl is throwing an exception. Most
    obvious things to look for are code references that might fail at
    runtiome because things like Server is null (thus a call to
    Server.MapPath in OnInit or in the constructor or OnRender would fail)
     
    , Mar 29, 2005
    #9
  10. ok, I created a new project and it is dropping into the new project. I
    tried adding a new page to my old project and it still was not working. My
    page layout is defualted to Flow instead of Grid, would that have anything
    to do with this issue? The new defualted to grid.

    So, assuming there's a problem with my project that makes the drop fail,
    what could it be? Where should I start looking? Or is it a bug in VS.net?

    Andrea
    "" <> wrote in message
    news:...
    > Most of the time when this happens it is because your UserControl is
    > throwing an exception of some sort. There are a few occassions where
    > this will just "happen" and creating a new web page or a new project
    > usually solves it. In cases where it does not it is most likely because
    > somewhere along the line the UserControl is throwing an exception. Most
    > obvious things to look for are code references that might fail at
    > runtiome because things like Server is null (thus a call to
    > Server.MapPath in OnInit or in the constructor or OnRender would fail)
    >
     
    Andrea Williams, Mar 29, 2005
    #10
  11. Andrea Williams

    Guest

    One of those wonderful mysteries of life.
     
    , Mar 30, 2005
    #11
    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. Oliver Klein
    Replies:
    0
    Views:
    721
    Oliver Klein
    Aug 24, 2003
  2. Lizard
    Replies:
    2
    Views:
    417
    Nigel Wade
    Aug 11, 2006
  3. Khoi Pham

    drag and drop in a custom web control

    Khoi Pham, Jul 30, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    195
    Alvin Bruney
    Jul 31, 2003
  4. Gilles

    Drag & Drop custom control

    Gilles, Feb 1, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    176
    Gilles
    Feb 1, 2005
  5. ArnoB
    Replies:
    2
    Views:
    1,121
    ArnoB
    Feb 26, 2009
Loading...

Share This Page