Hi, I'm thinking about going into the ASP.NET MVC scene.
I've seen the videos at http://asp.net/learn, but they havn't impressed me.
So can you answer me, what makes MVC "so impressive", and why does it make life better and easier?
...
Hi,
If you have the following type.
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public List<TheParameters> Parameters { get; set; }
public Address Address { get; set; }
}
public class Address
{
public string Street { get; set; }
public string City { get; set; ...
I'm creating a menu for my web site. It's got a hierarchical structure.
Here's what I want:
Great Grandparent
Grandparent
Parent
Sibling1
Sibling2
Sibling3
Self
Child1
Child2
Child3
HTML:
<ul>
<li><a href="/389">Great Grandparent</a>
<ul>
<li><a href="/456">Grandparent</a>
<ul>
...
We discovered problem when deploying MVC application on IIS7 server: any route navigation gives 404 error. I've found on web that problem can be solved by setting application pool managed pipeline mode to integrated, but now we have exception:
Request is not available in this context
Description: An unhandled exception occurred during ...
I've got a whole bunch of these errors on my View aspx file.
But, It builds and runs just fine.
What are they? How do I get rid of them?
...
I've got a user management application that includes a membership provider and an associated user model that inherits from MembershipUser. Things work, but I'm not certain I'm leveraging things just right. Where should the separation of concerns lie in what code is implemented in the model (like loading an object) versus GetUser from the...
Currently, I'm seeing when the DefaultModelBinder errors because the input is invalid for the type (character in int, invalid date, etc.) I get UI default error summary “Something has gone wrong…” but no specific error message, regarding the specific property that failed conversion.
For example a model property might be a datetime that ...
I tried to make the ViewEngine use an additional path using:
base.MasterLocationFormats = new string[] {
"~/Views/AddedMaster.Master"
};
in the constructor of the ViewEngine. It works well for aspx and ascx(PartialViewLocationFormats, ViewLocationFormats).
I still have to supply the MasterPage in web.config or in the page declara...
Are there any best practices or examples of how to best integrate Facebook connect with an existing ASP.NET Application using the Membership provider (or something similar). I'm sure I can get something going, but, it would be great if there was some information and best practices on this to mitigate any security concerns. Currently I...
I have a controller that loads some dropdowns based on the user type. For example:
public ActionResult Index()
{
switch (SessionHelper.ViewLimit)
{
case "C":
ViewData["CustDivision"] = LoadCustDivisions();
ViewData["Customer"] = LoadCustomers();
break;
...
I'm writing a new application in ASP.NET MVC. I've created a custom MembershipProvider that stores membership data in my own db schema. It all works, but how do I get the MembershipUser in my application, such that I can get the user key of the logged-on user and load model classes relating to that user?
...
When I use UpdateModel or TryUpdateModel, the MVC framework is smart enough to know if you are trying to pass in a null into a value type (e.g. the user forgets to fill out the required Birth Day field) .
Unfortunately, I don't know how to override the default message, "A value is required." in the summary into something more meaningful...
Links to articles would also be appreciated--I don't know the terminology to search for.
I'm looking to learn how a web application can allow for server-to-client communications. I know the web was not designed for this and that it has been something of a hurdle, and am just wondering what the state of this is, and what the best practic...
I'm checking out ASP.NET MVC RC2. Is the API documentation completely missing? I should be able to find something by hitting F1, right?
...
I've encountered a strange issue.... when I use UpdateModel() or TryUpdateModel() everything works fine. When I try binding myself (e.g. MyObject.FirstName = collection["FirstName"] I get a "Object reference not set to an instance of an object" error.
It's a little hard to explain, so I'll present the code:
[HandleError]
[Acce...
What are your best resources for a WinForms/WPF developer to come up to speed on ASP.NET? Will it take a complete paradigm shift for me to learn how to use ASP.NET or will it be a slight adjustment?
I will award the answer flag to the post with a resource that gets me up to speed in the shortest amount of time. Downloadable code and c...
I using extension for Object, because it provides very short accessible string.
public static BusinessLayer.Models.SearchEngineEntities db(this object o)
{
if (HttpContext.Current == null)
return new BusinessLayer.Models.SearchEngineEntities(ConfigurationManager.ConnectionStrings["SearchEngineEntities"].ConnectionString);
if (...
When I add a new view I don't get intellisense for the HTML helper object until I compile. I guess it must be a VS issue. But what changes when I compile? What makes it work?
EDIT: More Details
I am running RC1 on VS2008 pro. I have had this issue since I started with MVC using preview 2.
When I create a new view I do not get intellise...
Please can anybody point out where this code might be going wrong. I am trying to create a partial class for the masterpage.
The master pages class:
namespace MuniWeb.Models.SiteMaster{
public class BaseViewData
{
public string Title { get; set; }
public string MetaKeywords { get; set; }
public string MetaDescription { g...
I am delevelopring my first MVC application and I am using a classic ADO.NET dataset as a model. The guide I am following is the NerdDinner ASP.NET MVC Tutorial and it mentions a GetRuleViolations() method for a Linq To SQL model. I would like to have a similar method to check that a datarow is valid after editing. How could I do such a ...