CheckedListBox in asp.net

Discussion in 'ASP .Net' started by Erik Cruz, Feb 26, 2004.

  1. Erik Cruz

    Erik Cruz Guest

    Hi.

    I have read some articles about hosting windows forms controls on asp.net
    pages but all of them show how to use custom controls. I would like to show
    on one of my pages the checkedlistbox windows control. I believe that the
    steps are the same, but what do I need to reference in my <object> tag in
    order to acomplish this?

    TIA,
    Erik Cruz
     
    Erik Cruz, Feb 26, 2004
    #1
    1. Advertising

  2. you don't need to mess with the object tag because you may have a type
    entering the clsid. Just drag the windows control unto the form. Studio (if
    that's what you are using) will automatically fill in the blanks. I am
    assuming you have the rest setup correctly
    here's what the code should look like for a slider web control added on to a
    form. the object tag is below
    [ComSourceInterfaces (typeof(IWebSliderEvents))]

    public class WebSlider : System.Windows.Forms.TrackBar{}

    [InterfaceType (ComInterfaceType.InterfaceIsIDispatch)]

    public interface IWebSliderEvents

    {

    //[DispId (1)] void SizeChanged (object sender, EventArgs e);

    [DispId (1)] void Scroll(object sender, EventArgs e);

    }

    //object
    <OBJECT id="Slider" style="Z-INDEX: 101; LEFT: 160px; WIDTH: 160px;
    BORDER-TOP-STYLE: outset; BORDER-RIGHT-STYLE: outset; BORDER-LEFT-STYLE:
    outset; POSITION: absolute; TOP: 152px; HEIGHT: 16px; BORDER-BOTTOM-STYLE:
    outset"
    classid="clsid:F08DF954-8592-11D1-B16A-00C0F0283628" VIEWASTEXT>

    </OBJECT>
    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/3he3b
    "Erik Cruz" <> wrote in message
    news:e2yt5vA$...
    > Hi.
    >
    > I have read some articles about hosting windows forms controls on asp.net
    > pages but all of them show how to use custom controls. I would like to

    show
    > on one of my pages the checkedlistbox windows control. I believe that the
    > steps are the same, but what do I need to reference in my <object> tag in
    > order to acomplish this?
    >
    > TIA,
    > Erik Cruz
    >
    >
     
    Alvin Bruney [MVP], Feb 26, 2004
    #2
    1. Advertising

  3. Erik Cruz

    Erik Cruz Guest

    Hi Alvin.

    I created the control and added it to my toolbox. However, the control
    appears grayed out in my toolbox and I can't drag it to my web form. Is it
    the default behaviour? How can I turn it available in my toolbox?

    TIA,
    Erik Cruz

    "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
    news:OuhYvQI$...
    > you don't need to mess with the object tag because you may have a type
    > entering the clsid. Just drag the windows control unto the form. Studio

    (if
    > that's what you are using) will automatically fill in the blanks. I am
    > assuming you have the rest setup correctly
    > here's what the code should look like for a slider web control added on to

    a
    > form. the object tag is below
    > [ComSourceInterfaces (typeof(IWebSliderEvents))]
    >
    > public class WebSlider : System.Windows.Forms.TrackBar{}
    >
    > [InterfaceType (ComInterfaceType.InterfaceIsIDispatch)]
    >
    > public interface IWebSliderEvents
    >
    > {
    >
    > //[DispId (1)] void SizeChanged (object sender, EventArgs e);
    >
    > [DispId (1)] void Scroll(object sender, EventArgs e);
    >
    > }
    >
    > //object
    > <OBJECT id="Slider" style="Z-INDEX: 101; LEFT: 160px; WIDTH: 160px;
    > BORDER-TOP-STYLE: outset; BORDER-RIGHT-STYLE: outset; BORDER-LEFT-STYLE:
    > outset; POSITION: absolute; TOP: 152px; HEIGHT: 16px; BORDER-BOTTOM-STYLE:
    > outset"
    > classid="clsid:F08DF954-8592-11D1-B16A-00C0F0283628" VIEWASTEXT>
    >
    > </OBJECT>
    > --
    > Regards,
    > Alvin Bruney [ASP.NET MVP]
    > Got tidbits? Get it here...
    > http://tinyurl.com/3he3b
    > "Erik Cruz" <> wrote in message
    > news:e2yt5vA$...
    > > Hi.
    > >
    > > I have read some articles about hosting windows forms controls on

    asp.net
    > > pages but all of them show how to use custom controls. I would like to

    > show
    > > on one of my pages the checkedlistbox windows control. I believe that

    the
    > > steps are the same, but what do I need to reference in my <object> tag

    in
    > > order to acomplish this?
    > >
    > > TIA,
    > > Erik Cruz
    > >
    > >

    >
    >
     
    Erik Cruz, Feb 28, 2004
    #3
    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. Ben
    Replies:
    3
    Views:
    1,154
  2. =?Utf-8?B?ZGhucml2ZXJzaWRl?=

    MetaBuilders CheckedListBox font size problem

    =?Utf-8?B?ZGhucml2ZXJzaWRl?=, Jan 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    411
    =?Utf-8?B?ZGhucml2ZXJzaWRl?=
    Jan 19, 2005
  3. Andrea Raimondi
    Replies:
    1
    Views:
    482
  4. Murugan

    How to use checkedListbox Control using C#.net Webform

    Murugan, Nov 13, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    217
    Murugan
    Nov 13, 2004
  5. Amelyan
    Replies:
    2
    Views:
    160
    Amelyan
    Apr 25, 2005
Loading...

Share This Page