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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    570
    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:
    472
    Hans Kesting
    Feb 9, 2004
  3. Richard Wilson
    Replies:
    0
    Views:
    6,405
    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,999
    Charlie@CBFC
    May 11, 2004
  5. Sam Kuehn

    adding user controls at runtime

    Sam Kuehn, Nov 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    623
    Sam Kuehn
    Nov 19, 2004
  6. Shilpa
    Replies:
    1
    Views:
    490
    Karl Seguin
    May 24, 2005
  7. Mantorok

    Adding user controls at runtime

    Mantorok, May 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    477
    Mantorok
    May 23, 2005
  8. Joe Goldthwaite
    Replies:
    2
    Views:
    358
    Martin v. Löwis
    Nov 30, 2007
Loading...