Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pageBaseType in asp.net mvc3 razor - works! - no intellisense though?

I set a custom pageBaseType in web.config like this...

<pages pageBaseType="Status.Site.CustomWebViewPage">

In my cshtml view, I do this to make sure I see the CustomWebViewPage base type, I do.

Response.Write(this.GetType().FullName);
Response.Write(this.GetType().BaseType.FullName);

As a stupid test, my CustomWebViewPage has one method R that looks like this.

public abstract class CustomWebViewPage<T> : WebViewPage<T>
{
    public void R(string content)
    {
        Response.Write(content);
    }
}

And that works fine, I can call my silly R method from my cshtml and poof it works.

BUT - I am getting no intellisense love in the cshtml file, which is a major bummer.

Any ideas?

like image 689
user133380 Avatar asked Jan 30 '11 19:01

user133380


1 Answers

Try closing and reopening the file. Also, does Razor IntelliSenses work for "regular" razor files?

like image 88
marcind Avatar answered Nov 05 '22 15:11

marcind