mvc

ASP.NET MVC REST Service

If you have been following my past question, located here,link text I had more ?'s If I go with ASP.NET MVC service, my client at prersent has 1 stored procedure which has 20 nullable parameters and returns the search result which I could turn to json or pox. The question is how would I invoke the MVC with so many parameters? They pre...

Database calls in Smarty/views/templates

Today at work someone tried to convince me that: {$obj->getTableInfo()} is fine for smarty/mvc/templating because it is using an objects method. I argued that because it makes a call to the database it has no place being there and it should be in the controller (we don't actually use MVC). Am I right in my understanding of the logical...

ASP.NET - Alias dropdownlist names on back end

I'm using .NET 3.5, MVC. I want to use a set of string aliases to represent database values. i.e. when a user selects an option from a dropdown it actually sets the value as 0, 1, 2, etc. in the table, rather than the text shown in the dropdown itself. e.g. I'm doing: IdName[] Thing = new[] { new IdName { Id = 0, Name = "No Selecti...

How Can I Reconstruct URL/Route in ASP.NET MVC From Saved Data?

My unfamiliarity with the ASP.NET MVC framework and the plumbing thereof has brought me here, and I appreciate the patience it will take for anyone to read and consider my question! Okay, here is the scenario: I have an application that has numerous pages with grids that display data based on searches, drilling down from other data, rep...

In Rails, how can you output the name of the action from inside the view?

If I render the update action from inside the create action, is there a way for the "update" view (i.e. update.html.erb) to know which action rendered it. I want the update view to print out the action name "create" when the create action renders it and print out the word "update" when the update action renders it. The problem is render ...

Can anybody suggest a true MVC framework for building a PHP application from scratch?

There are several questions on SO about MVC and PHP. I already know the mvc frameworks that are out there like CodeIgniter, Cake PHP, Zend PHP, Agavi, etc., I played with most of them and feel that they are bit of hack but nevertheless good implementations of presentation abstractions. I need some advice from PHP experts and veterans on ...

Is MVC# Popular with Winform?

Hi, Is this a popular combination out there (MVC# and Winform)? Is MVC really worth it with traditional Winform application development? Or should I just stick with the 3tier model? Thanks ...

Opinion on Generic .Net Mvc Crud extensions

Dont know if you allowed to ask this sort of thing here... but as they say easier to ask for forgiveness rather than permission. I have dipped my toe into "giving back to the community" and would like people's opinion on the project. In short it is a colleciton of generic crud controller and repository classes and interfaces to automat...

How to get my SQL DB to match my Domain Driven Design

Okay, I'll be straight with you guys: I'm not sure exactly how Domain Driven my Design is, but I did start by building Model objects and ignoring the persistence layer altogether. Now I'm having difficulty deciding the best way to build my tables in SQL Server to match the models. I'm building a web application in ASP.NET MVC, although ...

How can I see the validation results while in a controller's action?

I have an update action in a controller that performs an UpdateModel. Before I pass the data back to the view I want to log the properties that failed to validate. I expected the dictionary where the errors are stored to be in the ModelState (since the method AddModelError() is there) but this doesn't seem to be the case. How can I ac...

ASP.NET MVC Error Logging in Both Global.asax and Error.aspx

I'm creating an ASP.NET MVC application. I need to handle exceptions in two places. Global.asax.vb file: Public Class MvcApplication Inherits System.Web.HttpApplication ... Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) LogException(HttpContext.Current.Server.GetLastError(), Request) End Su...

ASP.Net MVC ModelState / Html.TextBox postback issue

I have an issue cropping up in a form I'm trying to post. In the scenario where the form doesn't validate, I'm taking the standard route of calling ModelState.AddModelError() then returning a View result. The thing is, the HTML.* helpers are supposed to pick up the posted value when rendering and I'm noticing that my text fields ONLY do...

Are all MVC platforms the same?

In the future I will be working with MVC with java/j2ee,hibernate,and more, but for now I have asp.net, php, python, ruby, etc. If I learn how to use MVC asp.net or MVC with a php framework, or RoR, will that help me with the Java version? I don't want to wait until I start the java project before I start really learning how to use MVC...

ASP.NET MVC and AjaxFileUpload

Ok, this is driving me nuts. I have been trying to figure this out forever now. I want to to perform an async upload using ajaxFileUpload. I have it posting the file to my controller just fine, however, when i try to return a JsonResult from it, I get a "Save File As" dialog box. I have tried everything to get around this and i either ge...

Where should i set my db object in my model ? (MVC)

I would like to know where is the best place to set my db object with my model. Should I hard coded it since my model should be designed for one project, so i set it inside my constructor or wherever i do initialization ? or Should I pass my db object to my constructor when instancing my object ? What is the best way, i mean from exper...

In MVC, does an ORM represent the model?

In MVC, is the ORM the same as the model or just a way the model can be designed? In other words, the "model" doesn't care how you get data as long as you get it. Or, does "model" imply that I no longer have a bunch of SQL statements in my code like in code behind forms? Something else? Thank you. ...

What is the best open-source .NET(C#) blogging software

Are there any reasonable complete open-source C# .NET blogging engines out there? Something a budding programmer may be able to extend? MVC Ideally. ...

MVC versus WebForms

It seems to me like there's a lot of sheeping going on, with everyone jumping on the MVC bandwagon. Almost everyone is declaring WebForms as evil and satan without much persuasion. Then they go on to say that Controls are evil and they shouldn't be in a Web app. How are you going to show anything without any controls? I remember when W...

How to separate view from controller without using interface builder

I want to create UI elements programmatically without using xib files. All of the examples I have found (UICatalog, ...) are creating UI elements directly in the controller methods. What is the best practice to keep up with MVC patternn and separate views from controllers? Thanks ...

I've decoupled my user model from the main domain model that represents a 'person' and wonder how to retrieve personalized user data in the controller context.

Example: [Authorize] public ActionResult Index() { var person = _userPersonalizationService.GetPersonForUser(User.Identity.Name); var campaigns = _campaignRepository.GetCampaignsByCompanyId(person.Company.CompanyId); return View(campaigns); } Basically every user is tied to a person model, and in this instance, I want the ...