I'm fairly certain that the fxcop rule you are referencing is a design guidline only, not from the common language specification. It is only a suggestion. I'm pretty sure that the only reference to casing in the CLS is that you can't use only case to differentiate public members on a type, even if your language supports it.
Andy Smith
Posts
-
Think about it -
Is this a bug?There is no bug in IMageButton. input type="image" does not call the __doPostBack function because it is one of the html4 elements which automatticly posts the form when clicked. As far as events not firing, the following page works fine for me.
<script runat="server" language="c#" > protected void Image_Click( Object sender, ImageClickEventArgs e ) { Result.Text = "Clicked"; } </script> <html><body><form runat="server" > <asp:ImageButton runat="server" OnClick="Image_Click" ImageUrl="foo.jpg" /> <asp:Label runat="server" Id="Result" EnabledViewState="False" /> </form></body></html>
-
selecting items in List ControlCheck out my free CheckedListBox control.
-
Loop thru ListBox selected items?Check out my free DualList control.
-
enter key and initial cursor point- Use my free DefaultButtons control. 2) Use my free FirstFocus control.
-
Method not found: System.String System.Web.UI.WebControls.ListControl.get_SelectedValuefrom the msdn docs for SelectedValue: "Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework. " which means that the host that it doesn't work on... is running .net 1.0.
-
Determine if .NET is installed on CLIENT?If they are using IE, then their useragent string contains information on what version of the clr they have.
-
Singletons: Static ctors or Monitors?acorrding to this article, the best way is thus:
// .NET Singleton sealed class Singleton { private Singleton() {} public static readonly Singleton Instance = new Singleton(); }
as for your threading question: "What about thread-safe initialization? The Framework addresses this too. The Framework internally guarantees thread safety on static type initialization." -
radio button datagriduse my free RowSelectorColumn.
-
StackOverflowExceptionsomething like this: public struct TradeData { public object OrderTime { get { return orderTime; } set { orderTime = value; } } private Object orderTime; }
-
StackOverflowExceptionyour problem is the way you wrote the properties. //struct public struct TradeData { public object orderTime { get { return orderTime; } set { orderTime = value; } } this is a c# translation of the resulting IL created for that: public Object get_orderTime() { return get_orderTime(); } public set_orderTime(Object value) { set_orderTime(value); } both of these will obviously recurse until you stackoverflow. either make those properties into fields, or provide internal storage for the public property.
-
Reusing Formsmake these "forms" as usercontrols instead.
-
Render code from control designer in code-behindNo.
-
Constant Referencenon-editable parameters is not supported by the CLS nor c#. In order to simulate this, you can make a clone of the object you are passing in.
-
Accessing viewstate from Component Objectwhile you can cast HttpContext.Current.Handler to System.Web.UI.Page, the ViewState is a protected property. You can't access it from a seperate component. You would be better off deriving from System.Web.UI.Control.
-
Application & Window positions -
Catpuring Button Press In A WebFormTo associate button click events with a postback caused by pressing enter, use my DefaultButtons control.
-
Reg focus problem in user controlfocusing non-input controls doesn't really make much sense for web forms. If your user control doesn't contain any input controls, what do you expect the focusing to _do_?
-
Irc Client samplesin addition, check out my irc client lib, Nebo.
-
Default Button when ENTER is pressedyou are right, there is nothing built in for this. check out my free DefaultButtons control.