Home All Groups Group Topic Archive Search About

Accessing the controls in the PagerTemplate when using FormView

Author
11 Jan 2007 6:19 AM
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.
--
Nathan Sokalski
njsokal***@hotmail.com
http://www.nathansokalski.com/

AddThis Social Bookmark Button