B. Clay Shannon B. Clay Shannon - 1 month ago 14
ASP.NET (C#) Question

Why is setting html properties false considered an unexpected token?

I'm unable to build a VB.NET site I've inherited due to a nebulous error.

Without a clue as to what might be causing it, I turned the hounds of the Czech Republic loose on it (otherwise known as Resharper). It ended up showing me 20 errors and upwards of a thousand other "issues" with the solution:

enter image description here

Okay, so I'm going after the errors first; ASP Errors first. The first one pointed to this:

<telerik:RadButton ID="ExportButtonRad" DisabledButtonCssClass="rbDownload' UseSubmitBehavior="false" EnableViewState="false" AutoPostBack="true" CommandName="ExportToExcel" Skin="Default" Visible="false" OnClientClick="document.body.style.cursor = 'wait';" ButtonType="StandardButton" HoveredCssClass="goButtonClassHov" ToolTip="Export" runat="server" Text="Export">

...and flagged the following portion:


...as an "Unexpected token"; so I removed that, and re-ran the Resharper > Inspect > Code Issues in Solution.

Now there are more (not less) ASP Errors, and that same element ("ExportButtonRad") is red-flagged again for the same supposed infraction ("Unexpected token"); this time EnableViewState="false" is the culprit or scapegoat.

So I'm afraid that if I remove that, I will have 11 ASP Errors and it will finger some other property set to false as being bogus. I have suspicions this is not the real problem. Does anybody know about any "gotchas" with this that might be the underlying cause of this whack-a-moliation?


I think the problem will be this:


Equalise the quotes.