May 26, 2009, 12:10 PM
It seems like there are often multiple methods/properties that do the same thing. The difference is that one should be used during initial page load while the other is for AjaxEvent. Is it possible to separate them somehow or make it more apparent when to use one vs the other?
For example, I am adding listitems to a combobox dynamically in code during pageload. I originally used ComboBox.Items.Add. After getting latest, I saw there's a new ComboBox.AddItem method. I thought, "nice, a shortcut so less code for me to write." Of course, after making the change, I get the error message that this method must be called during an AjaxMethod.
It would be nice to somehow mark that method as Ajax only. Even putting it as part of the method description with intellisense would be nice.
Me.cbRanges.AddItem("Test", "Test") Me.cbRanges.Items.Add(New Coolite.Ext.Web.ListItem("Test", "Test"))
Me.cbRanges.AjaxAddItem("Test", "Test") Me.cbRanges.Ajax.AddItem("Test", "Test")