[233] ASP.Net MasterType is not recognized

In ASP.Net, it is possible to specify the master type for the page declaratively using the <%@ MasterType directive. The net effect is that you don't have to cast the Page.Master property to a specific type, the ASP.Net infrastructure takes care of it. ReSharper does not appear to recognize this.

http://www.intellij.net/tracker/resharper/viewSCR?publicId=22460

Thanks!
-Michael

5 comments
Comment actions Permalink

Michael,

Your case should be some tricky, for this feature was implemented a number
of builds ago. Could You create a small sample solution for us?

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

I tracked it down and the issue was that the Master page included a user control page that RS had trouble parsing. Specifically, the page included a client side script block that itself included an <asp:Literal> control. This is legal in ASP.Net but the resharper parser is not able to grok it.

-Michael

0
Comment actions Permalink

Michael,
We do not support controls in client script blocks yet. And unfortunately,
almost sure will not support them by 2.0 release.
Could You explain, please, what is the goal of placing a server control
within client script block, and how typical is the pattern for ASP
developers?

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

The pattern is pretty common for injecting a literal into js. Either code, or, more commonly, server control id.

for example,

var labelId = ''; var label = document.getElementById(labelId); ... ]]>

-Michael

0
Comment actions Permalink

We use that too, as you already know... I reported this a while back (and
there is a Tracker issue for it).

While it's probably not super-common, it's certainly common enough.

"Michael" <no_reply@jetbrains.com> wrote in message
news:15480169.1144847693404.JavaMail.itn@is.intellij.net...

The pattern is pretty common for injecting a literal into js. Either code,
or, more commonly, server control id.

>

for example,

>

<script>
var labelId = '<asp:Literal ID="LabelIdLiteral" runat="server" />';
var label = document.getElementById(labelId);
..
</script>

>

-Michael



0

Please sign in to leave a comment.