C'tor of WebUserControl

Discussion in 'ASP .Net' started by =?Utf-8?B?T3Jlbg==?=, Oct 16, 2005.

  1. Hello everyone...

    I have a simple WebUserControl with Button and TextBox on it. Webform1.aspx
    contains this WebUserControl.
    How can I create my own C'tor for this WebUserControl - I mean when I run
    Webform1.aspx I want to send data to the UserControl (fill Textbox1.Text).

    any samples ?

    thanx,
    Oren
     
    =?Utf-8?B?T3Jlbg==?=, Oct 16, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?T3Jlbg==?=

    Karl Seguin Guest

    Oren:
    Check out http://openmymind.net/index.aspx?documentId=9

    you can't use anything like a constructor because controls aren't
    instantiated like normal classes. If you want to set values, you create
    properties in the user control and read them in Page_Load of the user
    control.

    Karl

    --
    -->
    MY ASP.Net tutorials
    http://www.openmymind.net/
    http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
    "Oren" <> wrote in message
    news:...
    > Hello everyone...
    >
    > I have a simple WebUserControl with Button and TextBox on it.
    > Webform1.aspx
    > contains this WebUserControl.
    > How can I create my own C'tor for this WebUserControl - I mean when I run
    > Webform1.aspx I want to send data to the UserControl (fill Textbox1.Text).
    >
    > any samples ?
    >
    > thanx,
    > Oren
     
    Karl Seguin, Oct 16, 2005
    #2
    1. Advertising

  3. Karl,

    How can I call to a Function/Property and send data dynamically to the
    UserControl ? I mean Instead (look at CurrentPage):
    <Result:Header id="rh" CurrentPage="1" RecordsPerPage="2" runat="server" />
    To do:
    <Result:Header id="rh" CurrentPage="GetText()" RecordsPerPage="2"
    runat="server" />

    GetText() -> on the Webform...

    (code was taken from your link below...)
    http://openmymind.net/index.aspx?documentId=9

    thanx,
    Oren
    "Karl Seguin" wrote:

    > Oren:
    > Check out http://openmymind.net/index.aspx?documentId=9
    >
    > you can't use anything like a constructor because controls aren't
    > instantiated like normal classes. If you want to set values, you create
    > properties in the user control and read them in Page_Load of the user
    > control.
    >
    > Karl
    >
    > --
    > -->
    > MY ASP.Net tutorials
    > http://www.openmymind.net/
    > http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!
    > "Oren" <> wrote in message
    > news:...
    > > Hello everyone...
    > >
    > > I have a simple WebUserControl with Button and TextBox on it.
    > > Webform1.aspx
    > > contains this WebUserControl.
    > > How can I create my own C'tor for this WebUserControl - I mean when I run
    > > Webform1.aspx I want to send data to the UserControl (fill Textbox1.Text).
    > >
    > > any samples ?
    > >
    > > thanx,
    > > Oren

    >
    >
    >
     
    =?Utf-8?B?T3Jlbg==?=, Oct 17, 2005
    #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. =?Utf-8?B?T3Jlbg==?=

    C'tor of WebUserControl

    =?Utf-8?B?T3Jlbg==?=, Oct 17, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    474
    =?Utf-8?B?T3Jlbg==?=
    Oct 19, 2005
  2. Raffael Vogler
    Replies:
    8
    Views:
    1,189
    Chris Uppal
    Nov 30, 2003
  3. Mark McFarlane
    Replies:
    9
    Views:
    70,506
    javamazon
    Dec 20, 2011
  4. Jakob Bieling

    Q: c'tor and assignment operators

    Jakob Bieling, Jan 16, 2005, in forum: C++
    Replies:
    1
    Views:
    390
    Rolf Magnus
    Jan 16, 2005
  5. Gernot Frisch

    explicit specialization od c'tor

    Gernot Frisch, Jan 17, 2005, in forum: C++
    Replies:
    11
    Views:
    584
    Andrey Tarasevich
    Jan 17, 2005
Loading...

Share This Page