Geeks With Blogs
ken spencer

This error drives me nuts frequently when editing a .ASPX page. Its really weird.

And of course I have this code at the top of the page:

<%-- The following line works around an ASP.NET compiler warning --%>
<%: ""%>

Today I figured out that sometimes I think VS just gets confused. For instance, this line might work just fine:

<%= SomeVar %>

Then again it might generate that error above.  The only real fix I have found for those lines is to replace = with Response.Write which = is a shortcut for anyway:

<%Response.Write( SomeVar) %>

Posted on Tuesday, May 31, 2011 2:46 PM | Back to top


Comments on this post: MVC: Error '__o' is not declared. It may be inaccessible due to its protection level.

No comments posted yet.
Your comment:
 (will show your gravatar)
 


Copyright © xamlnotes | Powered by: GeeksWithBlogs.net | Join free