mvc

dynamic property access for generated LINQ Classes

How can I access dynamically properties from a generated LINQ class ? Cause I would like to be able to customize the displayed table columns where Partner is the LINQ Class generated from a SQL Server Database Table. <table class="grid"> <thead> <tr> <% foreach (Column c in (IEnumerable)ViewData["columns"]) { %> <th><%= ...

Please critique my first attempt at MVC in PHP

Well I'm not a huge framework guy but I've been liking what I've been hearing about the whole MVC movement so I thought I'd try to create a simple application in my language of choice (PHP) So I guess the question is: where did I go wrong? I know there is a lot of debate as to how fat the controller/model should be so hopefully we can ...

Pacman game class design.

Hi Everyone, I have to write a multiplayer pacman game in Java for a university assignment and I'm after some feedback for my design so far. So I'm trying to go down an MVC style and this is what I've sketched out. I've never designed anything using MVC, so my knowledge is really only from the pragmatic programmer and a short lecture ...

Does the controller handle all interaction with the model in MVC?

I'm creating a pacman game using the MVC pattern. According to this diagram on wikipedia the model and the view interact. "Note: the solid lines indicate a direct association, and the dashed lines indicate an indirect association" Now from my understanding, surely everything goes through the controller? Say for example, player moves ...

ASP.NET MVC Standard Link/Href As Save Button And Model IS NUll...

Okay so, i am totally new to MVC and I'm trying to wrap my head around a few of the concepts. I've created a small application... This application has a view for creating a new Individual record. The view is bound to a model ViewPage... And I have a associated IndividualController which has a New method... The New method of the Individ...

How do I Dynamically Preselect an item in a html.DropDownlist in ASP.NET MVC

Hi Everyone, is there way thats i can preselect an item when the page loads or posts to the server.. this is what i have right now.. <%=Html.DropDownList("dllMonths", new SelectList(new List<string>() { "", "January", "Feburary", "March", "April", "June", "July", "August", "September", "October", "November", ...

MVC frameworks for .NET desktop applications.

I've been playing a lot with MVC lately in the forms of ASP.NET MVC and Django (MTV actually) and I must say that I love it. Are there any similar frameworks for creating desktop WinForm apps? ...

What are the Best practices for Writing MVC App?

Coming from ASP.NET Webform and Classic ASP. I want to know what are the best practices. Are MVC apps would not really be using Server Controls and ViewStates? If so the persisting of the html form controls would be similar to classic ASP. Thanks ...

ASP.NET MVC Controls & CSS

Hi everyone, I am trying to apply css on my html.dropdownlist with a regular html select list css. Can anyway one show me how to go about doing this & where am I going wrong with this this is what i have right now.. <div id="container"> Months &nbsp; <%=Html.DropDownList("dllMonths", new SelectList(new List<string>() { "January", ...

Shouldn't MVC be called MCV?

The direction of data flow in the MVC pattern is Model -> Controller -> View so why isn't it called "the MCV pattern"? Is there something significant about the order of letters in "MVC" or is it merely more mellifluous? ...

How do I represent Domain Aggregates in MVC pattern?

SHould I create a separate class for each object in an aggregate or should the objects be nested classes of a single aggregate class? ...

Does Django development provide a truly flexible 3 layer architecture?

A few weeks ago I asked the question "Is a PHP, Python, PostgreSQL design suitable for a non-web business application?" http://stackoverflow.com/questions/439759/is-a-php-python-postgresql-design-suitable-for-a-business-application A lot of the answers recommended skipping the PHP piece and using Django to build the application. As I've...

Ajax ModalPopup Extender with ASP.NET MVC

Hi Everyone, I am trying to implement an Ajax ModalPopup Extender but i have no clue where to start. Can somene please show me how to go about doing this or atleast guide me in the right direction. Thanx Owais ...

ASP.NET MVC - Multiple models in a form and model binders

I have a form which needs to populate 2 models. Normally I use a ModelBinderAttribute on the forms post action i.e. [Authorize] [AcceptVerbs("POST")] public ActionResult Add([GigBinderAttribute]Gig gig, FormCollection formCollection) { ///Do stuff } In my form, the fields are named the same as the models pro...

Does asp.net remove <script> tags in repeaters and inside the <% for loop %> in mvc

I have some script type="javascript"/script tags inside both a repeater and a for loop in mvc. On page render the script is gone and is not displayed both inside the repeater and the for loop (they are separate). Is there some option I need to set to stop this from happening? Has anyone had this happen to them? ...

ASP.NET MVC - Routes and UrlHelper

I have the following route routes.MapRoute( "GigDayListings", // Route name "gig/list/{year}/{month}/{day}", // URL with parameters new { controller = "Gig", action = "List" }, new { year = @"^[0-9]+$"...

ASP MVC Cookies not persisting

I have a ASP MVC App with some seemingly simple code to save and retrieve cookies but for some reason they won't persist. The code in the controller is : if (System.Web.HttpContext.Current.Response.Cookies["CountryPreference"] == null) { HttpCookie cookie = new HttpCookie("CountryPreference"); cookie.Value = country; cookie....

MVC with PHP CodeIgniter: user authentication

I am writing a web-app PHP. I want to use MVC pattern for this, and decided to go with CodeIgniter. My application will have some pages which will require authentication, some pages wont. I want to design this in a very generic way, so that there should be no code duplication. Can any one point to some good "design/class structure" fo...

Network theory and MVC

I've designed an MVC that doesn't allow communication between Views (forms). If a form needs to communicate with another form, it raise an event on the controller, which other forms can subscribe to. The general idea is to keep paths of communication to a minimum, helping keep complexity down. Each View communicates with the RootContr...

jQuery + MVC User Controls

What I'm trying to do is pass parameters to a user control view which will update a div tag and render the new data based on a hidden user control there. I know how to update a div tag using the Ajax.Form() Helper Method but passing parameters and updating the partial control is beyond me. I've never used jQuery and looked up some tutori...