Accessing the controls in the PagerTemplate when using FormView

Discussion in 'ASP .Net Web Controls' started by Nathan Sokalski, Jan 11, 2007.

  1. I am using a FormView control, and want to access the controls I have
    created in the PagerTemplate. Right now, I am doing this using the following
    method:


    CType(Me.FormViewID.FindControl("PagerTemplateControlID"), LinkButton)


    However, this gives me the following error:


    Object reference not set to an instance of an object.


    I am trying to access these controls in the Load event, and I think that
    that is why I am having the problem. However, I am not sure how to fix the
    problem. I would appreciate any help that anyone can give. Thanks.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
     
    Nathan Sokalski, Jan 11, 2007
    #1
    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. Nathan Sokalski
    Replies:
    0
    Views:
    404
    Nathan Sokalski
    Jan 11, 2007
  2. Nathan Sokalski
    Replies:
    2
    Views:
    2,047
    Nathan Sokalski
    Jan 15, 2007
  3. Nathan Sokalski

    Accessing the controls in the PagerTemplate when using FormView

    Nathan Sokalski, Jan 11, 2007, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    731
    Nathan Sokalski
    Jan 11, 2007
  4. Nathan Sokalski

    Programmatically modifying the controls in FormView's PagerTemplate

    Nathan Sokalski, Jan 13, 2007, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    710
    Nathan Sokalski
    Jan 15, 2007
  5. Nathan Sokalski

    Programmatically modifying the controls in FormView's PagerTemplate

    Nathan Sokalski, Jan 13, 2007, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    184
    Nathan Sokalski
    Jan 15, 2007
Loading...

Share This Page