adding controls dynamically at runtime

Discussion in 'ASP .Net' started by Mark Siffer, Jun 21, 2004.

  1. Mark Siffer

    Mark Siffer Guest

    I am trying to add a compare validator at runtime. I would add it before
    but my input controls are built at runtime via an editable datagrid.
    Therefore, the names of the controls are not known until the page has been
    rendered. Any ideas?

    Thanks in advance
    MS
     
    Mark Siffer, Jun 21, 2004
    #1
    1. Advertising

  2. Mark Siffer

    avnrao Guest

    set CompareValidator1.ControlToCompare and
    CompareValidator1.ControlToValidate after creating your controls.

    Av.
    "Mark Siffer" <> wrote in message
    news:...
    >I am trying to add a compare validator at runtime. I would add it before
    > but my input controls are built at runtime via an editable datagrid.
    > Therefore, the names of the controls are not known until the page has been
    > rendered. Any ideas?
    >
    > Thanks in advance
    > MS
    >
    >
     
    avnrao, Jun 21, 2004
    #2
    1. Advertising

  3. Mark Siffer

    Mark Siffer Guest

    The problem I am running into is that if you don't set those properties you
    can't have the ruant=server property set either. And if you leave that off,
    then you get a compile error in the code page that tries to reference the
    CompareValidator1


    "avnrao" <> wrote in message
    news:uaMlr%...
    > set CompareValidator1.ControlToCompare and
    > CompareValidator1.ControlToValidate after creating your controls.
    >
    > Av.
    > "Mark Siffer" <> wrote in message
    > news:...
    > >I am trying to add a compare validator at runtime. I would add it before
    > > but my input controls are built at runtime via an editable datagrid.
    > > Therefore, the names of the controls are not known until the page has

    been
    > > rendered. Any ideas?
    > >
    > > Thanks in advance
    > > MS
    > >
    > >

    >
    >
     
    Mark Siffer, Jun 21, 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. Uzi Baruch
    Replies:
    0
    Views:
    453
    Uzi Baruch
    Dec 17, 2003
  2. =?Utf-8?B?TGluZGEgV2llbmhvbHQ=?=

    Adding User Controls at Runtime

    =?Utf-8?B?TGluZGEgV2llbmhvbHQ=?=, Feb 9, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    377
    Hans Kesting
    Feb 9, 2004
  3. Richard Wilson
    Replies:
    0
    Views:
    6,288
    Richard Wilson
    Feb 26, 2004
  4. Charlie@CBFC

    Adding controls to Repeater during runtime

    Charlie@CBFC, May 11, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    3,886
    Charlie@CBFC
    May 11, 2004
  5. Joe Goldthwaite
    Replies:
    2
    Views:
    281
    Martin v. Löwis
    Nov 30, 2007
Loading...

Share This Page