.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

how to interact with Custom control in C#.net?

Posted By: chandrakant     Posted Date: February 28, 2011    Points:2   Category :C#

I have create one custom control.In which i used one check box ,one picture Box and one Progress bar.

I am using this control dynamically.it will create the multiple control on flow layout.

But i want to select all check box on Button Click "Select All".

How can i proceed?

or it is possible?

Please Help ?

Thanks You.

Responses
Author: Sunil Yadav       [Moderator]      
Posted Date: February 28, 2011     Points: 20   

Hi,

Check out below code.


void btnShowAll_Click(object sender, EventArgs e)
{
foreach (Control c in Page.Controls)
{
if (c is CheckBox)
{

CheckBox chkbob=(CheckBox)c;
chkbob.Checked=true;

}
}
}




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend