asp.net-mvc

ASP.NET MVC: Redirecting back to page when no parameter is provided in Firefox 3

I'm trying to do exactly the same thing as detailed in this question: ASP.NET MVC: Redirecting back to page when no parameter is given to URL Here's my code: public ActionResult Details(long? id) { if (!id.HasValue) return RedirectToAction("Index"); Models.Track track = Models.Track.GetTrack(id.Value); if (track =...

ASP.NET MVC Generic Html and Url helpers

Where has the generic html controls and url helpers gone ? You know the ones that looked something like this: this.TextBox<MyInputModel>(model=>model.Name) this.ActionLink<MyController>(controller=>controller.Index) ...

Looking for a code sample or "template" for an EF Repository

I'm looking for a good Entity Framework repository code sample or template. ...

ASP.NET MVC suitable to complex web application?

Last week , my boss ask my team to evaluate ASP.NET MVC, for next project. all of us working with webform since .NET 1.1, we have no MVC experience before ,but all of my colleague are interest in ASP.NET MVC ,But no luck , our finally answer is NO. Because: 1. we believe although you are ASP.NET Guru, you can build a complex application...

How to recognize that an article or demo about asp.net-mvc is out of date?

I've been frustrated with a lot of my time I've spent researching asp.net-mvc. It seems that a lot of the articles have information that no longer applies to the current version of asp.net-mvc and sometimes it takes awhile to recognize that what I'm reading is no longer relevant. Does anyone know of any resources that can help me to reco...

ASP.NET MVC > ASP.NET WebForms, Why?

I've now completed my first web application using ASP.NET MVC and overall, I still am not grasping why this is getting all the praise and glory. Maybe I'm being stubborn. I know that what makes MVC great is that is forces separation between the presentation layer and the business object or data layer along with its stateless operation. ...

ASP.NET MVC Html.RadioButton Exception

I haver a simple radio button list on my page that I render with the following in my view: <label for="gender">Gender</label> <%= Html.RadioButton("gender", 1) %> Male <%= Html.RadioButton("gender", 2) %> Female <%= Html.ValidationMessage("gender") %> Note that when the user initially sees this input, neither button is ...

ASP.NET MVC Reporting

I am looking for reporting solution for ASP.NET MVC. I need: parameters support render to HTML export to Excel free / reasonably priced Any suggestion? ...

ASP.NET 2.0 Security Membership Provider Pattern

Hi, I am creating a website in ASP MVC. Can anyone give me some advice on using the built-in membership provider in the following way. I want my users to create an Administrative account for themselves and then create accounts for the people in their organization, or the people that they want to give access to. I guess in a Database i...

ASP.NET MVC. No idea how to use Url.action to pass an object to the controller

I am new to asp.net MVC. I was able to create my view and display the data (Gridview). Additionally, I was able to create a hyperlink (using Url.Action) passing string and int types. However, I want to create a hyperlink that it is referencing a more complex type. The class associated with my view has a reference to a List. What I want i...

Rerouting back to the previous controller and action in mvc.net

I have a UserController that have methods like Register, Login, Logout, etc. On my site I have a small login form that i've made as a partial view and is part of a masterpage. The behaviour I want is to be able to login from any view and then return to the controller I was at when i called the Login method. I can call the methods from ...

What is the best Version Control for Visual Studio 2008 SP1?

I plan on starting a small team for programming and would like to see what experts think about the best Source Control and Intergration with Visual Studio (most current version) is. We have VS Pro 3.5 SP1. (Developing ASP.Net MVC Web APP) Thanks, ...

Can I have nested User Controls in ASPnet mvc?

How would I go about this? EDIT: USER CONTROL WITHIN USER CONTROL? ...

ASP.NET MVC plus Silverlight

It seems to me that, for structured development with both depth and breadth of capability, ASP.NET MVC and Silverlight have the potential to make a nice powerful framework with superior UI granularity and reduced AJAX exposure. Have any of you tried building such a stack with future durability in mind? ...

Why is the data from my html form not submitting?

I am developing asp.net mvc application. I have a section on the form where I add some text boxes dynamically when the user clicks a "Add New Part" button. The problem is when I submit the form I don't get the data from the fields I added dynamically. I am passing the FormCollection to my controller and stepping through the code in th...

Best way to wire up database-driven menu in ASP.NET MVC

I'm looking for a way to handle a database-driven menu in ASP.NET MVC that doesn't violate the MVC principles. I want to replace the hard-coded, default, "Home, About" menu with something from my database. How would I wire this up? Would I just set up a ContentPlaceHolder in my Site.Master and have regenerated in my Views? That does...

How do i construct a route without ViewContext in ASP.NET MVC?

I want to create a route from a utility class that doesn't have access to a ViewContext. Is this possible? There doesnt seem to be any equivalent of ViewContext.Current I've tried fishing around in all the constructors for Routing and HttpContext but can't quite get to what I want. This is what I'm looking for - although this doesn't ...

Create three Cascading Dropdown Lists with Ajax in MVC

I have three dropdown list each dependent on previous one. How it is possible by using MicrosoftAjax & web services? I also want selected value in Edit view. I have seen tip41 of stephen walther. But i have error on each view i.e. <%= Html.DropDownList("--Select Make--", "Makes") %> that CS1061: 'System.Web.Mvc.HtmlHelper' does ...

MVC MasterPage Design Time Support When Running in a Virtual Directory

What is the preferred method of getting correct design time support for Master Pages when running an MVC application from a virtual directory? For example, given the following image tag in the master page: <img src="../../Content/Images/myimage.jpg" alt="image" /> This will provide full design time support in the master pages and all...

post and get with same method signature

In my controller I have two actions called "Friends". The one that executes depends on whether or not it's a "get" versus a "post". So my code snippets look something like this: // Get: [AcceptVerbs(HttpVerbs.Get)] public ActionResult Friends() { // do some stuff return View(); } // Post: [AcceptVerbs(HttpVerbs.Post)] public A...