Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Webcontrols added inside a Gridview are not accessible from code behind.

Reply
Thread Tools

Webcontrols added inside a Gridview are not accessible from code behind.

 
 
cclements1384@gmail.com
Guest
Posts: n/a
 
      10-26-2007
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

 
Reply With Quote
 
 
 
 
cclements1384@gmail.com
Guest
Posts: n/a
 
      10-26-2007
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

On Oct 26, 4:21 pm, (E-Mail Removed) wrote:
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Input Field Inside Floating Div Element Is Not Accessible in Safari vunet HTML 2 12-10-2007 04:05 PM
Solution for posterity: GridView, Datakeys, and "Item has already been added. Key in dictionary: 'CategoryID' Key being added: 'CategoryID'" ASP .Net 2 11-02-2006 04:48 AM
Object reference not set to an instance of an object. System.Web.UI.WebControls.ListItemCollection.SaveViewState() System.Web.UI.WebControls.ListControl.SaveViewState() Brano ASP .Net 3 11-08-2005 12:29 PM
Re: ListBox Items not accessible by codebehind when added from JScript John Saunders ASP .Net 0 07-01-2004 01:25 PM
Dynamically Added User Control not accessible! Cathy ASP .Net Web Controls 0 12-16-2003 12:21 PM



Advertisments