find control

Discussion in 'ASP .Net' started by Mr. SweatyFinger, Dec 1, 2006.

  1. Dim checkboxlist1 As CheckBoxList =
    FormView1.FindControl("insertitemtemplate.checkboxlist1")



    this doesnt' work.

    what's wrong



    finding the control is even harder than finding help in this group
     
    Mr. SweatyFinger, Dec 1, 2006
    #1
    1. Advertising

  2. Mr. SweatyFinger

    Masudur Guest

    Mr. SweatyFinger wrote:
    > Dim checkboxlist1 As CheckBoxList =
    > FormView1.FindControl("insertitemtemplate.checkboxlist1")
    >
    >
    >
    > this doesnt' work.
    >
    > what's wrong
    >
    >
    >
    > finding the control is even harder than finding help in this group


    Hi

    First switch the Formview's defaultmode to insertmode
    and then try your code except you dont need to set the templete name
    before your contro

    ''in page load
    FormView1.DefaultMode = FormViewMode.Insert;

    ''where you want to find....
    Dim checkboxlist1 As CheckBoxList =
    FormView1.FindControl("icheckboxlist1")


    Thanks

    Masudur
    Kaz Software Ltd.
    www.kaz.com.bd
     
    Masudur, Dec 1, 2006
    #2
    1. Advertising

  3. You are a king thanks for helping
    i hope it works

    "Masudur" <> wrote in message
    news:...
    >
    > Mr. SweatyFinger wrote:
    >> Dim checkboxlist1 As CheckBoxList =
    >> FormView1.FindControl("insertitemtemplate.checkboxlist1")
    >>
    >>
    >>
    >> this doesnt' work.
    >>
    >> what's wrong
    >>
    >>
    >>
    >> finding the control is even harder than finding help in this group

    >
    > Hi
    >
    > First switch the Formview's defaultmode to insertmode
    > and then try your code except you dont need to set the templete name
    > before your contro
    >
    > ''in page load
    > FormView1.DefaultMode = FormViewMode.Insert;
    >
    > ''where you want to find....
    > Dim checkboxlist1 As CheckBoxList =
    > FormView1.FindControl("icheckboxlist1")
    >
    >
    > Thanks
    >
    > Masudur
    > Kaz Software Ltd.
    > www.kaz.com.bd
    >
     
    Mr. SweatyFinger, Dec 1, 2006
    #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. Daves
    Replies:
    5
    Views:
    4,289
    topherzee
    Sep 10, 2008
  2. Chris

    Find Control in user control

    Chris, Jun 4, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    1,154
    Chris
    Jun 5, 2007
  3. Wybo Dekker
    Replies:
    1
    Views:
    366
    Yukihiro Matsumoto
    Nov 15, 2005
  4. vdvorkin
    Replies:
    0
    Views:
    414
    vdvorkin
    Feb 10, 2011
  5. vdvorkin
    Replies:
    3
    Views:
    816
    vdvorkin
    Feb 14, 2011
Loading...

Share This Page