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

Key: RSRP-43579
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Critical Critical
Assignee: Sergey Coox
Reporter: Jeremy Lew
Votes: 0
Watchers: 1
Operations

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

ReSharper incorrectly thinks that ASP.NET server controls declared in data-binding templates are declared at the page level

Created: 18 Jun 07 20:25   Updated: 29 Jun 07 15:37
Component/s: None
Fix Version/s: 3.0.1
Security Level: Everybody (All jira users)

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

Build: 465


 Description  « Hide
ASP.NET WebForm:
<asp:DataGrid OnItemDataBound="OnDataBound" ..etc..>
<ItemTemplate>
<asp:Textbox id="foo"/>
</ItemTemplate>
</asp:DataGrid>

Codebehind:

protected void OnDataBound( object sender, DataGridItemEventArgs e )
{
Textbox foo = e.Item.FindControl( "foo" ); // <--- declaration of variable foo is flagged as hiding the field of the same name
}

ReSharper does not recognize that foo only exists in the template section of the control, and that there is no page.foo field. It will flag the line above as a warning and also incorrectly provide intellisense for a field named foo at the page class level, even though it doesn't really exist.



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