Groups | Blog | Home
all groups > asp.net webcontrols > october 2007 >

asp.net webcontrols : Webcontrols added inside a Gridview are not accessible from code behind.


cclements1384 NO[at]SPAM gmail.com
10/26/2007 2:21:02 PM
Gurus,

I am trying to add a Drop Down List web control to the footer template
of a grid view. The problem is that once the control is created
(using markup) the name of the control is not accessible from the
page's code behind.

References to ddlmyControl in code fail to compile because the name is
not defined.

If I simply move the control out of the grid view, the control's
properties become accessible from the code behind and the application
compiles just fine.

I can't even find the partial class file to see if the controls are
getting added by the IDE (I suspect that is the problem) can anyone
provide me some advice?

Chris Clements
cclements1384 NO[at]SPAM gmail.com
10/26/2007 2:41:25 PM
Nevermind guys, I would need to access the properties of a control in
the databound using the fndcontrol method.
Sorry for the waste of bandwidth.

Chris

[quoted text, click to view]

AddThis Social Bookmark Button