Getting values from dynamically added controls

Discussion in 'ASP .Net' started by =?Utf-8?B?ZG90bmV0dGVzdGVy?=, Dec 5, 2005.

  1. Hi,

    I added a few link buttons in a function (loadControls) that is called only
    on the first time the page is loaded. On the postBack I don't call this
    function and want to retrieve the values of those controls (linkButtons). But
    the only time I can see the values is if call the (loadControls ) on postBack
    too.

    How can I get the values of the controls without calling the 'loadControls'
    function.

    Thnx
     
    =?Utf-8?B?ZG90bmV0dGVzdGVy?=, Dec 5, 2005
    #1
    1. Advertising

  2. Hey,

    Did you call the method in Page_load???

    If yes, call it in the Page_init method and hopefully everything should work
    fine!

    --
    Thanks,
    Rahul Soni

    --->The secret to creativity is knowing how to hide your sources<---



    "dotnettester" wrote:

    > Hi,
    >
    > I added a few link buttons in a function (loadControls) that is called only
    > on the first time the page is loaded. On the postBack I don't call this
    > function and want to retrieve the values of those controls (linkButtons). But
    > the only time I can see the values is if call the (loadControls ) on postBack
    > too.
    >
    > How can I get the values of the controls without calling the 'loadControls'
    > function.
    >
    > Thnx
    >
     
    =?Utf-8?B?UmFodWwgU29uaQ==?=, Dec 5, 2005
    #2
    1. Advertising

  3. You can't. This is how it is designed to work.

    Eliyahu

    "dotnettester" <> wrote in message
    news:...
    > Hi,
    >
    > I added a few link buttons in a function (loadControls) that is called
    > only
    > on the first time the page is loaded. On the postBack I don't call this
    > function and want to retrieve the values of those controls (linkButtons).
    > But
    > the only time I can see the values is if call the (loadControls ) on
    > postBack
    > too.
    >
    > How can I get the values of the controls without calling the
    > 'loadControls'
    > function.
    >
    > Thnx
    >
     
    Eliyahu Goldin, Dec 5, 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. Jeffrey Todd
    Replies:
    1
    Views:
    4,168
    Peter Blum
    Jun 2, 2005
  2. =?Utf-8?B?ZG90bmV0dGVzdGVy?=

    Accessing values of dynamically added controls on Postback

    =?Utf-8?B?ZG90bmV0dGVzdGVy?=, Jul 14, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    510
    Eliyahu Goldin
    Jul 14, 2005
  3. Nathan Sokalski

    Retrieving values from dynamically added controls

    Nathan Sokalski, Sep 9, 2007, in forum: ASP .Net
    Replies:
    7
    Views:
    1,267
    Scott Roberts
    Nov 20, 2007
  4. Aruna Bajpayee

    How to retrieve values of dynamically added web controls on the form??

    Aruna Bajpayee, Jul 26, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    142
  5. June Blasey

    getting values of dynamically added controls

    June Blasey, Feb 12, 2004, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    234
    June Blasey
    Feb 17, 2004
Loading...

Share This Page