mvc

Why is the MVC paradigm best suited for web applications?

I'm fairly certain my professor will ask me why I chose to use MVC for my web application. Truth be told, I'm new to MVC. I read about it, I'm building a blog application using it, I think it's very logical to approach a problem this way. But why? O_O I draw a blank. How is better suited than say, building an N-tier application? ...

Open a single worksheet (single tab) from a huge excel file on a web browser using c# asp.net / MVC

I have huge excel files that I have to open from web browser. It takes several minutes to load huge file. Is it possible to open a single worksheet (single tab) at a time from excel file that contains many worksheets? I have to do this using C# / asp.net MVC ...

Dismiss modalviewcontroller with a page curl

Hi, I am trying to dismiss a modalviewcontroller with a page curl. The curl works okay but I cannot seem to get the tableview under the modalviewcontroller to show up. The image of the modalviewcontroller is still under the curled away page. If I dismiss the modalviewcontoller before the animation finishes the animation doesn't show up. ...

learning a different platform independent web framework or relying on asp.net in mono for the near future?

Hi SO. I'm somehow familiar with the ASP.NET MVC and the .NET framework in general (I use it at work). I've been thinking about starting a personal project (a website). I, however, don't want to be tied to a specific platform (it bothers me A LOT). This led me to looking into Mono. For what I've seen, though, Mono trails behind Micros...

Newsletter for CI

Hello, is there a newsletter code available for CI ? Or something like PHPList for CI ? Something that is already written in MVC and could be using CI mailing library? Thank you ...

Does my fat-client application belong in the MVC pattern?

The web-based application I’m currently working on is growing arms and legs! It’s basically an administration system which helps users to keep track of bookings, user accounts, invoicing etc. It can also be accessed via a couple of different websites using a fairly crude API. The fat-client design loosely follows the MVC pattern (or per...

consume/unit test forms validated restful webservice

Hi, I am using asp.net mvc to create forms validated restful webservices. I am just wondering whether it is possible to consume these web services via, for example, a console application? How do I create the cookie etc. Ultimately I would like to unit test the actual web services. Thanks a lot. christian ...

How do I bind multiple dropdowns in my ASP.NET MVC Edit Page?

I have a viewmodel that contains a number of properties, a SelectList, and an array of child objects. public class RoundViewModel { public int RoundId { get; set; } public string RoundName { get; set; } public SelectList Teams { get; private set; } public List<GameViewModel> Games { get; set; } } public class GameViewMo...

MVC2 One Async Call, Multiple Async Updates...

I have an operation on my Page that then requires 3 long (few seconds each) operations to be performed in series. After each operation is performed though, I would like the controller to return a partial view and have the page update with a status (keeps the user informed, I find that if people know that stuff is happening they worry le...

MVC - Remove Master Page of a nested master Page

Hi, I would like to know if there is a way to programatically remove a master page of a nested master page. Lets say i have the following: Master A << Master B << View I am using the master pages actually like a wrapper for my View; they are containing javascript code. In some cases I don't need the Master Page A and I would like ...

ASP.NET MVC 2 - How to POST form Model from PartialView?

I have a single model type to wrap up various models I want to use in my view: public class QuestionViewData { public Question Question { get; set; } public IList<Answer> Answers { get; set; } } Now, in my question view I pull the data from the Question object - that's fine. Secondly I iterate through all Answer object...

Action call and javascript call in MVC web application

How do you call a server side code and javascript in MVC? We are having a close button on every page. on click of close button there should be a call to controller action and the browser should close. Also if the user clicks the browser close the same controller action should be called before closing. Have anyone done similar stuff befor...

MVC New Rows from Partial View

What I want to do here is to append the result of addItem action to the current div. What do you think the problem in the code? Page function showNewRow() { $.ajax( { url: "/Details/AddItem/", type: 'GET', dataType: 'html', success: function(data) { ...

mvc formatting text

i have text like this div bla-bla end div i need to get only 'bla-bla' without div, because of i need to call substring in controller only to text bla-bla not to div tags. is it possible p.s. how to input tags here? ...

catch method name of controller

i have master mage, in bottom i have such menu <div class="footMenu"> <ul> <li class="active"><a href="">test1</a> </li> <li><a href="">test2</a></li> <li><a href="">test3</a></li> </ul> </div> so in depends of view load a need to put class...

Drawing the line between the model and the Controller

I'm building this restful application using RoR, and am finding it a bit difficult to draw a line between things that should go on the model, and things that should go on the controller. As an example, I have 7 methods on my controller (the ones that make it restful i.e. index(), show(), create(), update()...), and often find that it's ...

PrincipalContext.ValidateCredentials always returns FALSE

Hello Everyone, I have an MVC application that needs to login and verify a user against active directory. I am using the PrincipalContext.ValidateCredentials method but always get a authentication of false. Connecting to the Server is fine. The problem seems to occur in the ValidateCredentials. Here is my code: public static bool...

ASP.NET MVC : Ignore latter route elements in url for a form's action

Hi, I have a URL /products/search where Products is the controller and Search is the action. This url contains a search form whose action attribute is (and should always be) /products/search eg; <%using( Html.BeginForm( "search", "products", FormMethod.Post)) This works ok until I introduce paging in the search results. For example i...

overlapping appointments using the entity framework

I am using the asp.net mvc with the Entity Framework. I have a list of appointments with a startedat field, an endedat field and a roomid field (called SpaceConfigurationId) and would like to find the list of appointments that have been double booked for a given room. It is fine to assume that endedat is always after startedat. There ar...

.NET MVC Controller action not invoked by GET or POST from Flex app

A flex app running in a view of my .NET MVC app can load data fine from another route, but submitting data via either POST or GET never invokes the controller action. Interestingly, the only way I can get the action method to fire is by passing intentionally malformed post variables in the http request. Odd. Content type is application/...