Hi,
i have a static .sitemap file for my site. I want to add 5 subcategories for each maincategory (@Products) so they will appear in my menu (menu is custom helper which works, i just need to add to the Sitemap.Provider some pages at runtime...) Is this possible?
Sitemap:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<node cont...
Is a server which returns 2.0.50727.4200 for System.Environment.Version going to support ASP.NET 3.5?
The webhost claims I should ignore the details in the control panel but I get 2.0.50727.4200 when checking the aforementioned system variable.
...
I have been scratching my head on this for a while now but still can't get it.
I'm trying to simply log in a user in an MVC2 application.
I have tried everything that I know to try but still can't figure out what I'm doing wrong.
Here are a few things that I have tried:
FormsAuthentication.SetAuthCookie( emailAddress, rememberMe );
v...
I am reading through the book ASP.NET MVC 1.0 Website Programming and the following is contained within the web.config file in the example project:
<authentication mode="Forms">
<forms defaultUrl="/" loginUrl="/user/login" />
</authentication>
<membership>
<providers>
<clear />
...
When you start an ASP.NET MVC project in Visual Studio 2008, you get a fully loaded site template, including login forms and the like. In the default form to login, you will find this in the markup...
<%= Html.CheckBox("rememberMe") %>
When you view the source in the browser, you will see that this renders to...
<input id="rememberM...
I have a ASP.Net MVC JsonResult function in which I want to return the contents of a PartialView (The content has to be loaded using Ajax, and for some reason I can't return a PartialViewResult).
To render the PartialView I need the ViewContext object.
How do you get the current ViewContext object within an Action method? I don't even ...
Hey,
Something pretty weird is happening with my app:
I have the following property in my ViewModel:
public int? StakeholderId { get; set; }
It gets rendered in a partial view as follows:
<%= Html.Hidden("StakeholderId", Model.StakeholderId) %>
The form is submitted, and the relevant controller action generates an id and updates ...
I have a strongly-typed view that receives a Design model for its rendering. My Design class (Entity) has a many-to-one relationship to a Designer (i.e. 1 Designer can have 1 or more Designs).
When trying to use the following code, I get an NullReferenceException for the Design.Designer relationship. Obviously I'm doing something wron...
I need a WCF service to sit on top of ASPNET membership and allow me to call all the methods of ASPNET membership such as validateUser, createUser etc.
I need this becasue I have out-of-firewall apps that need to access a single central ASPNET membership database. If they were all inside the firewall I'd just point the connectionstring ...
I've got a LINQ to SQL object, and I want to group the selected data and then pass it into a view. What's the correct way of doing this? I'm sure I need to group the data when I select it rather than grouping it in the view, as this will result in about 200 rather 50000 rows I need to pass into my view. Are there any good examples of ...
I need to send a big block of HTML in a Json object like this:
JsonResult jsn = Json(new Dictionary<string, object> { { "success", true },
{ "lastPID", posts[0].ID },
{ "content", "" } });
return jsn;
For some reason I get this error when I put that html block into the content var...
At the moment, i got quite badly fashioned view model.
Classes looks like this=>
public class AccountActionsForm
{
public Reader Reader { get; set; }
//something...
}
Problem is that Reader type comes from domain model (violation of SRP).
Basically, i'm looking for design tips (i.e. is it a good idea to spli...
I am running out of ideas here. Maybe you can advice me what pattern or method(s) to use.
User should be able to log in and change the appearance only for his/her profile.
The difference (AFAIK) with personalization is that personalized layout are seen only for the editor (him-/herself).
The difference between skinning, I guess, is that...
I have written a List`1 editor template for use with the EditorFor extension methods (MVC2), however I am running into issues when using generics + null objects.
Given a model
class MyModel {
public Foo SomeFoo { get;set; }
public List<Foo> SomeFooList { get;set; }
}
and a template in /Views/Shared/EditorTemplates/List`1.ascx
...
Hi,
i need to model the following scenario, but I can't get it working with the MvcSitemapProvider (i think my problem also maps directly to the default SiteMapProvider). I want to get the default breadcrumbs control to work properly with my dynamic data.
I have a list of products which are grouped by category which have a parent-categ...
I have set up a ruleset in my configuration file which has two validators, one of which is a built-in NotNullValidator, the other of which is a custom validator. The problem is that I see the NotNullValidator hit, but not my custom validator.
The custom validator is being used to validate an Entity Framework entity object.
I have used...
I'm new to MVC, so please bear with me. :-)
I've got a strongly typed "Story" View. This View (story) can have Comments.
I've created two Views (not partials) for my Comments controller "ListStoryComments" and "CreateStoryComment", which do what their names imply. These Views are included in the Story View using RenderAction, e.g.:
<...
I have a new ASP.Net MVC application that I am about to start and I am wondering if its worth my while to use the 2 RC version over MVC 1.
Will my MVC 1 applications upgrade easily to MVC 2 if I do continue with 1?
...
I have an asp mvc 2 app lication where I want to display a list of check boxes that a user can select, based on a list of records in a database. To display the list my model contains a List object and the view has a foreach, and outputs Html.CheckBox for each item in the list.
Is there a way to get the model populated with the select...
I have a search form with a DateTime search criterion, plus some other criteria:
<form method="get" action="/app/search">
<input type="text" value="13/01/2010" name="BeginDate"/>
<input type="text" value="blah" name="SomeOtherCriterion"/>
<form>
So I have a Search controller with a default Action (let's call it Index) and with...