Can you use the DataGrid.FindControl() method to find HTML CONTROLS?

Posted on 2008-02-11
Medium Priority
Last Modified: 2012-05-05
Hi Experts,
I've got a DataGrid with radiobuttons inside a template colum. The point is that those radiobuttons are HTML controls (that 's how I want them to stay) so I was wondering if I could use the FindControl method at server side just to get the values of the radiobutton html control... like this

for each (DataGridItem GridItem in MyGrid.items)
    if (rb.Checked)
   //more code this way I return the whole DataGridItem.

Question by:edwbear1976a
LVL 11

Assisted Solution

vs1784 earned 600 total points
ID: 20870124
Yes i think you can use FindControl method to find a control
LVL 37

Accepted Solution

samtran0331 earned 1400 total points
ID: 20870616
>>The point is that those radiobuttons are HTML controls (that 's how I want them to stay)
The html controls need to be set runat="server" and have ID's for you to be able to FindControl

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is a wide range of advantages associated with the use of ASP.NET. This is why this programming framework is used to create excellent enterprise-class websites, technologies, and web applications.
An ASP.NET Web Form User Control is not newly introduced in ASP.NET. In fact, it was an old technology yet still playing a role to generate web content, especially when we want to use it to have a better and easy way to control part of the web conte…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
Suggested Courses

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question