Accessing the controls in the PagerTemplate when using FormView

N

Nathan Sokalski

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top