?
Solved

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

Posted on 2008-02-11
2
Medium Priority
?
575 Views
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)
{
rb=(HTMLRadioButton)GridItem.FindControl("myHtmlRadioButton");
    if (rb.Checked)
  {
   //more code this way I return the whole DataGridItem.
   }


}
0
Comment
Question by:edwbear1976a
2 Comments
 
LVL 11

Assisted Solution

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

Accepted Solution

by:
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
0

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