History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-19335
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Sergey Coox
Reporter: Paul Bradshaw
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ReSharper

Problems parsing <asp:control> definitions in client script blocks

Created: 06 Aug 06 01:37   Updated: 18 May 07 20:34
Component/s: Language - ASP.NET
Fix Version/s: Future Versions
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 220
Old URL: http://www.intellij.net/tracker/resharper/viewSCR?publicId=19335


 Description  « Hide
I have some admittedly weird code that Resharper isn't parsing correctly, but which compiles correctly. It looks something like this:

At the top of the ascx page, there's a client side script block, but note that it has an asp:Literal definition embedded in it:

<script language=javascript>
var dirty = true;

function finish()
{
if (dirty && window.opener)
{
var buttonId = '<asp:Literal id="ButtonId" runat="server"></asp:Literal>';
var button = window.opener.document.getElementById(buttonId);

if (button == null && window.opener.dialogWin.args != null)

{ button = window.opener.document.getElementById(window.opener.dialogWin.args); }

if (button != null)
button.click();
window.close();
}
}

In the code-behind *.ascx.cs file, the identifier "ButtonId" is comming up as undefined and colored in red. The compiler compiles it fine, however, so it's NOT undefined.

I think the Resharper parser is balking at the idea of
the <asp:Literal ..../> definition being inside the script block, and
further, inside quotes of a variable assignment. This doesn't matter to the ASP.NET parser, and it shouldn't matter to Resharper either. That line still defines an asp page element, and thus should still be parsed and recognized and properly colored.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.