Is someone willing to help me with a simple VB example?

Discussion in 'ASP .Net Web Controls' started by Edwin Knoppert, Jun 15, 2005.

  1. I seen a lot of examples but it doesn't work out since they are in c.

    In VWD i want to prepare a usercontrol.
    At this time i use a usercontrol and place a textbox upon it.
    Not handy, i lose all direct properties, only with wrappers i can reach them
    again.
    I seen examples (in c) using some kind of ordinary class which wraps a
    control to a new classname, ideal!
    However i can't seem to make it work.
    Could some please write me a downloadable example (complete project zipped
    or so) with the following aspects please? :

    Textbox new class MyNewTextbox
    Property NewValue (get and set)
    Evt. to use from the toolbox.
    Assuming all existing properties and events are still available in the IDE,
    iow i simply want to extend the textbox control.
    All in Visual Basic mode, not c :)

    I think i can manage it from there

    Thanks!!
    Edwin,
     
    Edwin Knoppert, Jun 15, 2005
    #1
    1. Advertising

  2. Edwin Knoppert

    Patrice Guest

    Try :
    http://samples.gotdotnet.com/quickstart/aspplus/doc/webpagelets.aspx
    http://samples.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx

    Not sure but IMO it would be best to start by yourself and to ask specific
    questions one by one rather than asking someone else to build a sample that
    could be not what you wanted...

    For now I'm not sure if you want to create a user control or if you want to
    create a new control that inherits from an existing control...

    Patrice

    --

    "Edwin Knoppert" <> a écrit dans le message de
    news:42b042b1$0$17212$...
    > I seen a lot of examples but it doesn't work out since they are in c.
    >
    > In VWD i want to prepare a usercontrol.
    > At this time i use a usercontrol and place a textbox upon it.
    > Not handy, i lose all direct properties, only with wrappers i can reach

    them
    > again.
    > I seen examples (in c) using some kind of ordinary class which wraps a
    > control to a new classname, ideal!
    > However i can't seem to make it work.
    > Could some please write me a downloadable example (complete project zipped
    > or so) with the following aspects please? :
    >
    > Textbox new class MyNewTextbox
    > Property NewValue (get and set)
    > Evt. to use from the toolbox.
    > Assuming all existing properties and events are still available in the

    IDE,
    > iow i simply want to extend the textbox control.
    > All in Visual Basic mode, not c :)
    >
    > I think i can manage it from there
    >
    > Thanks!!
    > Edwin,
    >
    >
     
    Patrice, Jun 15, 2005
    #2
    1. Advertising

  3. I'll check but indeed inherit would be the best.
    A UC is rather poor, pasting the refer in each aspx and so.
    Also the properties is unhandy.
    I just need to extend a textbox therefore inherit seems the best option to
    me.



    "Patrice" <> schreef in bericht
    news:...
    > Try :
    > http://samples.gotdotnet.com/quickstart/aspplus/doc/webpagelets.aspx
    > http://samples.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx
    >
    > Not sure but IMO it would be best to start by yourself and to ask specific
    > questions one by one rather than asking someone else to build a sample
    > that
    > could be not what you wanted...
    >
    > For now I'm not sure if you want to create a user control or if you want
    > to
    > create a new control that inherits from an existing control...
    >
    > Patrice
    >
    > --
    >
    > "Edwin Knoppert" <> a écrit dans le message de
    > news:42b042b1$0$17212$...
    >> I seen a lot of examples but it doesn't work out since they are in c.
    >>
    >> In VWD i want to prepare a usercontrol.
    >> At this time i use a usercontrol and place a textbox upon it.
    >> Not handy, i lose all direct properties, only with wrappers i can reach

    > them
    >> again.
    >> I seen examples (in c) using some kind of ordinary class which wraps a
    >> control to a new classname, ideal!
    >> However i can't seem to make it work.
    >> Could some please write me a downloadable example (complete project
    >> zipped
    >> or so) with the following aspects please? :
    >>
    >> Textbox new class MyNewTextbox
    >> Property NewValue (get and set)
    >> Evt. to use from the toolbox.
    >> Assuming all existing properties and events are still available in the

    > IDE,
    >> iow i simply want to extend the textbox control.
    >> All in Visual Basic mode, not c :)
    >>
    >> I think i can manage it from there
    >>
    >> Thanks!!
    >> Edwin,
    >>
    >>

    >
    >
     
    Edwin Knoppert, Jun 15, 2005
    #3
  4. Edwin Knoppert

    Harolds Guest

    <ToolboxData("<{0}:TextBox runat=server></{0}:TextBox>")> Public Class
    TextBox : Inherits WebControls.TextBox
    Private _AllowEdit As Boolean = True

    <Category("TRC"), DefaultValue(True)> Public Property AllowEdit() As Boolean
    Get
    Return _AllowEdit
    End Get
    Set(ByVal Value As Boolean)
    _AllowEdit = Value
    End Set
    End Property


    "Edwin Knoppert" wrote:

    > I seen a lot of examples but it doesn't work out since they are in c.
    >
    > In VWD i want to prepare a usercontrol.
    > At this time i use a usercontrol and place a textbox upon it.
    > Not handy, i lose all direct properties, only with wrappers i can reach them
    > again.
    > I seen examples (in c) using some kind of ordinary class which wraps a
    > control to a new classname, ideal!
    > However i can't seem to make it work.
    > Could some please write me a downloadable example (complete project zipped
    > or so) with the following aspects please? :
    >
    > Textbox new class MyNewTextbox
    > Property NewValue (get and set)
    > Evt. to use from the toolbox.
    > Assuming all existing properties and events are still available in the IDE,
    > iow i simply want to extend the textbox control.
    > All in Visual Basic mode, not c :)
    >
    > I think i can manage it from there
    >
    > Thanks!!
    > Edwin,
    >
    >
    >
     
    Harolds, Jun 15, 2005
    #4
  5. I have seen such code but never understood how to deal with that.
    Save it as a specific filetype?
    I really don't know.

    I'm using VWB 2005 beta2

    Thanks,

    "Harolds" <> schreef in bericht
    news:...
    > <ToolboxData("<{0}:TextBox runat=server></{0}:TextBox>")> Public Class
    > TextBox : Inherits WebControls.TextBox
    > Private _AllowEdit As Boolean = True
    >
    > <Category("TRC"), DefaultValue(True)> Public Property AllowEdit() As
    > Boolean
    > Get
    > Return _AllowEdit
    > End Get
    > Set(ByVal Value As Boolean)
    > _AllowEdit = Value
    > End Set
    > End Property
    >
    >
    > "Edwin Knoppert" wrote:
    >
    >> I seen a lot of examples but it doesn't work out since they are in c.
    >>
    >> In VWD i want to prepare a usercontrol.
    >> At this time i use a usercontrol and place a textbox upon it.
    >> Not handy, i lose all direct properties, only with wrappers i can reach
    >> them
    >> again.
    >> I seen examples (in c) using some kind of ordinary class which wraps a
    >> control to a new classname, ideal!
    >> However i can't seem to make it work.
    >> Could some please write me a downloadable example (complete project
    >> zipped
    >> or so) with the following aspects please? :
    >>
    >> Textbox new class MyNewTextbox
    >> Property NewValue (get and set)
    >> Evt. to use from the toolbox.
    >> Assuming all existing properties and events are still available in the
    >> IDE,
    >> iow i simply want to extend the textbox control.
    >> All in Visual Basic mode, not c :)
    >>
    >> I think i can manage it from there
    >>
    >> Thanks!!
    >> Edwin,
    >>
    >>
    >>
     
    Edwin Knoppert, Jun 15, 2005
    #5
  6. Edwin Knoppert

    Harolds Guest

    Add a class to your project.
    replace the Public Class line with what I posted.

    "Edwin Knoppert" wrote:

    > I have seen such code but never understood how to deal with that.
    > Save it as a specific filetype?
    > I really don't know.
    >
    > I'm using VWB 2005 beta2
    >
    > Thanks,
    >
    > "Harolds" <> schreef in bericht
    > news:...
    > > <ToolboxData("<{0}:TextBox runat=server></{0}:TextBox>")> Public Class
    > > TextBox : Inherits WebControls.TextBox
    > > Private _AllowEdit As Boolean = True
    > >
    > > <Category("TRC"), DefaultValue(True)> Public Property AllowEdit() As
    > > Boolean
    > > Get
    > > Return _AllowEdit
    > > End Get
    > > Set(ByVal Value As Boolean)
    > > _AllowEdit = Value
    > > End Set
    > > End Property
    > >
    > >
    > > "Edwin Knoppert" wrote:
    > >
    > >> I seen a lot of examples but it doesn't work out since they are in c.
    > >>
    > >> In VWD i want to prepare a usercontrol.
    > >> At this time i use a usercontrol and place a textbox upon it.
    > >> Not handy, i lose all direct properties, only with wrappers i can reach
    > >> them
    > >> again.
    > >> I seen examples (in c) using some kind of ordinary class which wraps a
    > >> control to a new classname, ideal!
    > >> However i can't seem to make it work.
    > >> Could some please write me a downloadable example (complete project
    > >> zipped
    > >> or so) with the following aspects please? :
    > >>
    > >> Textbox new class MyNewTextbox
    > >> Property NewValue (get and set)
    > >> Evt. to use from the toolbox.
    > >> Assuming all existing properties and events are still available in the
    > >> IDE,
    > >> iow i simply want to extend the textbox control.
    > >> All in Visual Basic mode, not c :)
    > >>
    > >> I think i can manage it from there
    > >>
    > >> Thanks!!
    > >> Edwin,
    > >>
    > >>
    > >>

    >
    >
    >
     
    Harolds, Jun 15, 2005
    #6
  7. Edwin Knoppert

    Harolds Guest

    Actually you need to create a new project, and a class, put in the code I
    posted, build that project, add/remove items to your toolbox, select the dll
    that was created when you built the new project.

    "Edwin Knoppert" wrote:

    > I have seen such code but never understood how to deal with that.
    > Save it as a specific filetype?
    > I really don't know.
    >
    > I'm using VWB 2005 beta2
    >
    > Thanks,
    >
    > "Harolds" <> schreef in bericht
    > news:...
    > > <ToolboxData("<{0}:TextBox runat=server></{0}:TextBox>")> Public Class
    > > TextBox : Inherits WebControls.TextBox
    > > Private _AllowEdit As Boolean = True
    > >
    > > <Category("TRC"), DefaultValue(True)> Public Property AllowEdit() As
    > > Boolean
    > > Get
    > > Return _AllowEdit
    > > End Get
    > > Set(ByVal Value As Boolean)
    > > _AllowEdit = Value
    > > End Set
    > > End Property
    > >
    > >
    > > "Edwin Knoppert" wrote:
    > >
    > >> I seen a lot of examples but it doesn't work out since they are in c.
    > >>
    > >> In VWD i want to prepare a usercontrol.
    > >> At this time i use a usercontrol and place a textbox upon it.
    > >> Not handy, i lose all direct properties, only with wrappers i can reach
    > >> them
    > >> again.
    > >> I seen examples (in c) using some kind of ordinary class which wraps a
    > >> control to a new classname, ideal!
    > >> However i can't seem to make it work.
    > >> Could some please write me a downloadable example (complete project
    > >> zipped
    > >> or so) with the following aspects please? :
    > >>
    > >> Textbox new class MyNewTextbox
    > >> Property NewValue (get and set)
    > >> Evt. to use from the toolbox.
    > >> Assuming all existing properties and events are still available in the
    > >> IDE,
    > >> iow i simply want to extend the textbox control.
    > >> All in Visual Basic mode, not c :)
    > >>
    > >> I think i can manage it from there
    > >>
    > >> Thanks!!
    > >> Edwin,
    > >>
    > >>
    > >>

    >
    >
    >
     
    Harolds, Jun 15, 2005
    #7
  8. So far the suggestions didn't help, hey it's beta 2 2005, examples are or in
    c or older version.
    Comon, help me out for this version with a working VB example for a simple
    textbox + extra properties ok?
    Uncompiled control, like a usercontrol, i don't care if it's in the toolbox
    or not.



    "Edwin Knoppert" <> schreef in bericht
    news:42b042b1$0$17212$...
    >I seen a lot of examples but it doesn't work out since they are in c.
    >
    > In VWD i want to prepare a usercontrol.
    > At this time i use a usercontrol and place a textbox upon it.
    > Not handy, i lose all direct properties, only with wrappers i can reach
    > them again.
    > I seen examples (in c) using some kind of ordinary class which wraps a
    > control to a new classname, ideal!
    > However i can't seem to make it work.
    > Could some please write me a downloadable example (complete project zipped
    > or so) with the following aspects please? :
    >
    > Textbox new class MyNewTextbox
    > Property NewValue (get and set)
    > Evt. to use from the toolbox.
    > Assuming all existing properties and events are still available in the
    > IDE, iow i simply want to extend the textbox control.
    > All in Visual Basic mode, not c :)
    >
    > I think i can manage it from there
    >
    > Thanks!!
    > Edwin,
    >
    >
     
    Edwin Knoppert, Jun 16, 2005
    #8
    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. Jenny

    Willing to pay for help!

    Jenny, Nov 28, 2003, in forum: Perl
    Replies:
    2
    Views:
    463
    Jenny
    Nov 29, 2003
  2. Replies:
    3
    Views:
    437
    Oliver Wong
    Jul 19, 2006
  3. tenxian
    Replies:
    3
    Views:
    296
    RedGrittyBrick
    Apr 29, 2008
  4. Unity
    Replies:
    3
    Views:
    6,162
    guarana5
    Jul 28, 2008
  5. TGD101
    Replies:
    2
    Views:
    302
    Diez B. Roggisch
    Jul 29, 2008
Loading...

Share This Page