We have an asp.net custom control which is used in our webforms asp.net project. I renamed a control’s property and expected to get a compile time error in a place where this property is used as an attribute but it doesn’t happen. Why is it so?
Share
ASP.NET markup isn’t actually schema-checked, at compile time or even at runtime. You’re perfectly within your rights to write any old tag soup you like – ASP.NET won’t complain unless you explicitly do something that doesn’t make sense.
Put the above on an
aspxand you will get no complaint at compilation, nor even at runtime – you’ll just getsend to the browser. However, do
and at runtime you’ll get a parser error, as ASP.NET attempts to convert
ohdearinto a height value.To find this second type of error earlier, you can use ASP.NET precompilation. To find the first category of errors, I know of no other way than testing – even ReSharper appears not to offer any useful inspection.