viewpage

ASP.NET MVC Deployed project not working: Inheritance System.web.mvc.viewpage fails?

Hi, i have a MVC project which runs perfectly local. When I deploy to the production server I receive a compilation error: BC30456: 'Title' is not a member of 'ASP.views_home_index_aspx'. It makes me think that the inheritance of System.Web.ViewPage(of T) fails somehow... The project is deployed under http://server/ProjectName. The ...

trying to create a asp.net mvc viewpage w/o codebehind page

Hi, Trying to create a view page in my asp.net-mvc app. I have a strongly typed view, and I have also ovverriden the MVCPage class also. For some reason when I load the page it says it can't load the type: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Line 2: Inherits="Blah.MyViewPage<Blah.ViewDataForB...

When I click to open a ViewPage or a ViewUserControl Visual Studio 2008 hangs for me

When I double click on a ViewPage or a ViewUserControl in Visual Studio 2008 the whole application hangs for me, I have no idea why... The only error log I can find in the Event Log is this: .NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A035E00) (80131506) For more information, see Help and Support Center at htt...

Dynamic typed ViewPage

Is this possible? Here's what I'm trying: public ActionResult Index() { dynamic p = new { Name = "Test", Phone = "111-2222" }; return View(p); } And then my view inherits from System.Web.Mvc.ViewPage<dynamic> and tries to print out Model.Name. I'm getting an error: '<>f__AnonymousType1.Name' is inaccessib...

Is it right to generate the javascript using C# in ASP.NET MVC view page?

[Sorry for long question but it is necessary to explain the problem] I am working on a learning website and it is supposed to show a list of messages to user if there are any. Something like this: When user presses close button, that message must be marked "read" and should not be shown next time. Following code is used to generate t...

Reusing ViewPage/HtmlHelper in seperate project in ASP.NET MVC using C#

I want to use the ViewPage/HtmlHelper class in the System.Web.Mvc namespace in a seperate project. I imported the relevant libraries and then tried this: using System.Web.Mvc; using System.Web.Mvc.Resources; using System.Web.Mvc.Html; public static class Display { public static string CheckBox() { ViewPage viewPage = n...

ASP.NET MVC ViewPage Lifecycle

I would like to know when (which event/function) the class System.Web.Mvc.ViewPage runs when it reads the @Page directive of the view. In particular, I would like to programmaticly interpret the values of the @Page directive, override them, then have the cycle continue. ...

ViewUserControl containing ViewPage

Is there a way to get a reference for the ViewPage that contains a parital view from the partial view ?? ...

MVC Multiple ViewPage items in aspx required

Hi I need to pass in 2 objects to a page to access Model.NewsItems and Model.Links (the first is a class of news item objects with heading, content etc and the Links are a set of strings for hyperlink depending on whether the system is up or down. This is the page declaration <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site....

ASP.NET MVC ViewPage rendered in a ViewPage

I'm wondering if it is possible to render a ViewPage inside of a ViewPage. Normally, you'd have this: <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<my_object>"%> and then in the page you can render a user control: <%Html.RenderPartial("~/Views/Shared/mycontrol.ascx", this.ViewData);%> However I'd like to render a ViewPa...

ASP.NET MVC pass information from controller to view WITHOUT ViewData, ViewModel, or Session

I have a unique scenario where I want a base controller to grab some data and store it in a list. The list should be accessible from my views just as ViewData is. I will be using this list on every page and would like a cleaner solution than just shoving it in the ViewDataDictionary. After attempting to come up with a solution, I though...

Mvc viewpages and custom data for all pages.

Hi, I need some data to be available on all the viewpages inside the website. The data comes from an parameter supplied to all the routes, i want to get that param and get the according data for it and make it available for all the views (including the master pages). It would be nice if it could be done in one place. What do i need to...

Inheriting from ViewPage forces explicit casting of model in view

I try to inhering from ViewPage as shown in this question http://stackoverflow.com/questions/370500/inheriting-from-viewpage But I get a Compiler Error Message: CS1061: 'object' does not contain a definition for 'Spot' and no extension method 'Spot' accepting a first argument of type 'object' could be found (are you missing a using...