Forum Discussion
Raymond_Morris_
Jul 25, 2006Nimbostratus
Need a constructor for C# web page?
I've been working with the code from the video example of the simple iControl app (Nice job, Joe. You are a rock star.) I'm trying to use C to write a .NET web page to show a read-only view. Since thi...
Jul 25, 2006
In the video, I used a CheckedListBox which has the following Add() method:
Add(object item);
Add(object item, CheckState check);
Add(object item, bool isChecked);
The ListBox class only has one Add method
Add(object item)
Odds are that you are using a standard listbox.
Also, you have the parameters reversed in your code. The checked state is the second parameter, not the first.
private System.Windows.Forms.CheckedListBox lb_nodes;
.
.
.
//------------------------------------------------------------------------
// Loop over the items
//------------------------------------------------------------------------
for(int i=0; i{
lb_nodes.Items.Add(
node_defs[ i ].address + ":" +node_defs[ i ].port.ToString(),
Convert.ToBoolean(state[ i ]));
}
Try switching your control to a CheckedListBox, switch the parameters and you should be set.
-Joe
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects