I had this line in my page:
<asp:TextBox runat="server" ID="Server" />
And I was getting the following error:
Compiler Error Message: CS1061: 'System.Web.UI.WebControls.TextBox' does not contain a definition for 'ScriptTimeout' and no extension method 'ScriptTimeout' accepting a first argument of type 'System.Web.UI.WebControls.TextBox' could be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 172: global::ASP.applications_returndata_releasemanagement_aspx.@__initialized = true;
Line 173: }
Line 174: this.Server.ScriptTimeout = 30000000;
Line 175: }
Line 176:
After changing the ID to something else it was fine.
Does anyone know why you can't use "Server" as control ID? I searched and I couldn't find anything about reserved words for asp.net controls.
That's because System.Web.UI.Page
has already a field called Server
(You can see it when you navigate to the class definition of System.Web.UI.Page
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With