mvc

How to RedirectToAction in ASP.NET MVC without losing request data

Using ASP.NET MVC there are situations (such as form submission) that may require a RedirectToAction. One such situation is when you encounter validation errors after a form submission and need to redirect back to the form, but would like the URL to reflect the URL of the form, not the action page it submits to. As I require the form...

What are MVP and MVC and what is the difference?

When looking beyond the RAD (drag-drop and configure) way of building User Interfaces that many tools encourage you are likely to come across 2 design patterns called Model-View-Controller and Model-View-Presenter. My question has two parts to it: What issues do these patterns address? How are they similar? How are they different?...

Looking for a MVC Sample for WinForms

Can you point me to a good real-world WinForms MVC application/framework? I understand the Model part - that's your data, and I know the forms are the views, but what's the controller? Especially if I want to use data binding....

Is it better to create Model classes, or just stick with generic database utility class?

We have a simple utility class in-house for our database calls (a light wrapper around ADO.Net), but I am thinking of creating classes for each database/object. Would it be smart to do so, or would it only benefit if we were using the full MVC framework for ASP.Net? So we have this: SQLWrapper.GetRecordset(connstr-alias, sql-statement...

Multiple languages in an ASP.NET MVC application?

What is the best way to support multiple languages for the interface in an ASP.NET MVC application. I've seen people use resource files for other applications. Is this still the best way? ...

ASP.NET MVC - Is it worth it yet?

For any of you that have used ASP.NET MVC (especially the Stack Overflow team), do you think it's worth taking the plunge with a technology that's still in "Preview" releases, not even Beta yet? From what I've seen on the MVC site and various blogs, it seems that a lot is still in flux, making it so that upgrading to the latest MVC vers...

Public/Popular Websites using JavaServer Faces

Are there any popular and/or public websites that utilize the JavaServer Faces framework? I don't ever recall stumbling across any ever on the Internet. In my experience JavaServer Faces is usually reserved for non-public enterprise and business level applications. I am curious to know because I am researching how terrible of an idea it...

In ASP.NET MVC I encounter an incorrect type error when rendering a user control with the correct typed object

I encounter an error of the form: "The model item passed into the dictionary is of type FooViewData but this dictionary requires a model item of type bar" even though I am passing in an object of the correct type (bar) for the typed user control....

Is there a way to include a fragment identifier when using Asp.Net MVC ActionLink, RedirectToAction, etc. ?

I want some links to include a fragment identifier. Like some of the URLs on this site: http://stackoverflow.com/questions/5619/ie6-ssl-ajax-post-form-404-error#5626 Is there a way to do this with any of the builtin methods in MVC? Or would I have to roll my own HTML helpers? Thanks ...

MVC Preview 4 - No route in the route table matches the supplied values.

Hi, I have a route that I am calling through a RedirectToRoute like this: return this.RedirectToRoute("Super-SuperRoute", new { year = selectedYear }); I have also tried: return this.RedirectToRoute("Super-SuperRoute", new { controller = "Super", action = "SuperRoute", id = "RouteTopic", year = selectedYear }); The route in the glo...

MVC pattern question: Who has what? who calls what?

I am refactoring a project and I want to make it conform to the MVC pattern (model view control). There are three objects: a ServerList (maintains a list of servers that are active) - this guy will be the controller a Form - this is your standard .NET GUI a DatabaseThingy - wrapper class that reads/writes to database. (don't ask me wh...

How do you get a custom id to render using HtmlHelper in MVC

Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( "myCheckBox", "Click Here", "True", false ) %> only outputs: <input type="checkbox" value="True" name="myCheckBox" /> There is a name there for the form post back but no id for javascript or labels :-( I was hoping that changing it to: Html.CheckBox( "myCheckBox", "...

Use the routing engine for form submissions in ASP.NET MVC Preview 4

Hi, I'm using ASP.NET MVC Preview 4 and would like to know how to use the routing engine for form submissions. For example, I have a route like this: routes.MapRoute( "TestController-TestAction", "TestController.mvc/TestAction/{paramName}", new { controller = "TestController", action = "TestAction",...

A Stack Overflow Podcast throwback: What is to be done about tag soup?

A few weeks ago, in episode 14, Jeff and Joel were HTML, LINQ, Rails, et al: Atwood: Even in Rails land, where they have the flexibility of essentially redefining the language at will, to solve all these problems -- at a steep performance cost, obviously, but still, the productivity is worth it -- they still, if you look at the HTML ...

Validating posted form data in the ASP.NET MVC framework

I've been playing around with the ASP.NET MVC Framework and the one thing that's really confusing me is how I'm meant to do server side validation of posted form data. I presume I don't post back to the same URL, but if I don't, how do I redisplay the form with the entered data and error messages? Also, where should the validation logi...

MVC Learning Resources

Can someone recommend some good resources for learning about MVC? I've been doing ASP.Net since it came out, but I've never gotten into MVC at all. I want to understand how it works, why it's better (if it is), when to use it, and so on. It doesn't have to be specific to ASP.Net MVC, though anything about that would be great. I'm open to...

RSS Feeds in ASP.NET MVC

How would you reccommend handling RSS Feeds in ASP.NET MVC? Using a third party library? Using the RSS stuff in the BCL? Just making an RSS view that renders the XML? Or something completely different? ...

php Zend / MVC without mod_rewrite

I've seen it mentioned in many blogs around the net, but I believe it shoud be discussed here. What can we do when we have an MVC framework (I am interested in ZEND) in PHP but our host does not provide mod_rewrite? Are there any "short-cuts"? Can we transfer control in any way (so that a mapping may occur between pages)? Any ideas? Than...

ASP.NET Model-view-controller (MVC) - where do I start from?

I'd like to understand better the MVC pattern, as I'll be probably using it in the future (my job is mainly focused in developing .Net web apps). Can I ask to this community to help me find a starting direction on this subject? Articles, white papers, code samples, theory... anything you found helpful! Many thanks Andrea ...

How do I get rid of Home in ASP.Net MVC?

I know this site is written using ASP.Net MVC and I do not see "/Home" in the url. This proves to me that it can be done. What special route and do I need? ...