ASP.Net file parsing ... asp IDs showing up as unresolved
Looking at some Asp.Net files, I notice that Resharper isn't recognizing
some definitions.
For example, in the *.ascx file, there are lines like this:
<asp:PlaceHolder id="TemplateBody1" runat="server"></asp:PlaceHolder>
<asp:PlaceHolder id="TemplateBody2" runat="server"></asp:PlaceHolder>
<asp:PlaceHolder id="TemplateFooter" runat="server"></asp:PlaceHolder>
But usages of TemplateBody1, TemplateBody2, and TemplateFooter in the
corresponding *.ascx.cs code-behind file show up as undefined:
SetContentPlaceHolders(TemplateBody1, TemplateBody2);
(both TemplateBody1 and TemplateBody2 show up in red with the "Cannot
Resolve Symbol" error)
Just FYI.
Please sign in to leave a comment.
Just used for a day. I find that it doesn't recognize any new
controls.
I used it on a form with Wizard control. Non of the controls that are placed
in wizard steps are recognized. was able to do that if I play around
with HTML view a little and if I restarted IDE (or just reload it) R# would
pick up these control no problem.
has problems with this.
Thanks
Shimon.
"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:dtfqa2$am0$1@is.intellij.net...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Paul,
It was a bug with Placeholder control in 219. I've fixed it in 220.
--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Shimon,
Could You post into the tracker (or here, or directly to me - qx at
jetbrains dot com) examples with unresolved ids. It would help us a lot.
--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
I returned back to 217 now.
I will describe what I did.
1. Add new page.
2. Add Wizard control to page
3. Make sure you have 2 steps (this is default anyway)
4. In First step add ListBox and call it lstNames
5. In Second step add a Label and call it lblResult.
6. Go to Code view and try to type in Load event lstNames or lblResult. On
my machine it was always red.
7. Go to HTML view of the page and switch back to design view .This would
help for simple page - no Wizard controls or multiview in 217. But it will
not help in our case.
8 . Go back to HTML view and try to play around with tags inside of wizard
control. This would in some cases help in 217 but doesn't help here.
9. Go to Tools > Add-ins .... Remove Resharper. Close.
10 . Go back and add it . This always helped in 217 and didn't help in 219.
11. If IDE totally closed result as in 10.
If you won't be able to reproduce this bug I will try later to start new
solution with 219 and see it I can reproduce it again.
Thank you,
Shimon.
"Sergey V. Coox (JetBrains)" <qx@intellij.com> wrote in message
news:dth33q$khq$1@is.intellij.net...
>
>
Shimon,
You had to close .aspx file and reopen it to get it processed by OR# (it's
our problem with processing VS events - we still did not solve it).
You may indicate the file processed by gutter on the right with a colored
square.
NB We also cannot process aspx files, that were open on solution startup
unless they are closed and reopened.
--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
I have no big problem with opening and closing files but it didn't work for
.
"Sergey V. Coox (JetBrains)" <qx@intellij.com> wrote in message
news:dthtv9$vkl$1@is.intellij.net...
>
>
Shimon,
Very strange. Could You create a small solution to illustrate the problem?
--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Sorry took some time till I got to it.
Here is the project. lblResult and ddlUsers are red on my machine even after
VS restart. txtAmount is fine after I switched to HTML view and back to
design.
Thank you.
"Sergey V. Coox (JetBrains)" <qx@intellij.com> wrote in message
news:dtpbnq$spo$1@is.intellij.net...
>
>
Attachment(s):
Test219.zip
Shimon,
Thanks a lot, I'll check it ASAP.
--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Shimon,
Fixed in 220.
--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Thanks.
"Sergey V. Coox (JetBrains)" <qx@intellij.com> wrote in message
news:dtv4u2$u77$1@is.intellij.net...
>