I am having a trouble while trying to create an entity with a custom view modeled create form. Below is my custom view model for Category Creation form.
public class CategoryFormViewModel
{
public CategoryFormViewModel(Category category, string actionTitle)
{
Category = category;
ActionTitle = actionTitle;
}
...
I have a hybrid ASP.NET WebForms/MVC project. In my Master Page, I have a "menu" User Control and a "footer" User Control. Anyways. I need to pass some data (2 strings) to my "menu" User Control on my Master Page (to select the current tab in my menu navigation, etc.) My views are strongly-typed to my data model. How can I push data...
Hi all,
I wish to create a view like
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.DateTime?>" %>
but I get an error saying that DateTime must be a reference type in order to use for parameter TModel.
Fair enough, but I google plenty of examples that implement just what I try to achieve.
Any clues as to ...
Hi guys,
I have a question about asp.net mvc-2 strongly typed partial views, and view models.
I was just wondering if I can (or should) have two strongly typed partial views on one page, without implementing a whole new view model for that page.
For example, I have a page that displays profiles, but also has an inline form to add a q...
I have my Model defined externally in two projects - a Core project and an Interface project.
I am opening the Add View dialogue from my controller, and selecting Create a strongly typed view.
In the drop down list, I can select the concrete types like MyProject.Model.Core.OrderDetails, but the interface types like MyProject.Model.Int...
This is a strange one. I changed something (not sure what) and now my app's view doesn't compile at runtime.
The view itself is strongly typed:
<%@ Page Language="C#"
MasterPageFile="~/Views/Shared/Site.Master"
Inherits="System.Web.Mvc.ViewPage<MyNamespace.OperatorModel>" %>
When I visit the page, it fails to compi...
I have a strongly typed Person view, that I want to render a partial in:
Person View (strongly typed as person)
<label for="name">Name</label>
<% Html.RenderPartial("AddressForm"); %>
</label>
AddressForm View (untyped, because I also want to use this in the Distributor strongly typed view)
When I try to call this partial from t...