vrijdag 14 augustus 2009
Check if windows user is a member of a specific Active Directory group
assembly: System.DirectoryServices
donderdag 13 augustus 2009
Save xml file with indenting
XmlTextWriter textWriter = new XmlTextWriter(@"D:\temp.xml", null);
textWriter.Formatting = Formatting.Indented;
MyXmlDoc.Save(textWriter);
textWriter.Formatting = Formatting.Indented;
MyXmlDoc.Save(textWriter);
woensdag 12 augustus 2009
maandag 10 augustus 2009
Combobox.SelectedIndex vs Combobox.SelectionChangeCommitted
By using the SelectionChangeCommitted event, you know that it's a user who changed the combobox selected index
SelectedIndexChanged
* raised when DataSource is set
* raised when SelectedIndex is set programmatically
SelectionChangeCommitted
* not raised when DataSource is set
* not raised when SelectedIndex is set programmatically
SelectionChangeCommitted is raised first when a user selects an item from combobox before the SelectedIndexChanged is raised. Both events are not raised when items are added throught the Items property of the control.
source
SelectedIndexChanged
* raised when DataSource is set
* raised when SelectedIndex is set programmatically
SelectionChangeCommitted
* not raised when DataSource is set
* not raised when SelectedIndex is set programmatically
SelectionChangeCommitted is raised first when a user selects an item from combobox before the SelectedIndexChanged is raised. Both events are not raised when items are added throught the Items property of the control.
source
Abonneren op:
Posts (Atom)