mvc

ASP MVC dynamic fields in editor

I have a form which will include some optional questions that need to asked of the user. In my model it may look like pubic Dictionary<String, String> Questions { get; set; } where the key is the label and value is the text box. How can I create and populate controls for this? I'm new to ASP MVC, but it makes sense that something like...

How to search a hybrid ASP.NET Intranet site?

How would you implement a search facility within an ASP.NET hybrid application? I'm really tempted to start rebuilding our Intranet application using ASP.NET MVC & Web Forms (mainly MVC though). I know how to search the dynamic content from a database, but I'm struggling with the static content in the Views. Surely this should be an eas...

How do I create a simple seach box with a submit button to bring back a result set in MVC?

I am very new to MVC and just learning the basics. I have been following along in Nerd Dinner and used the demo as a way to create my own app. I have created a page that lists out some food items with calories, fat, protein,etc... (http://rjsfitness.net/CalorieList) This is one of my own personal sites that I set up to test out MVC. ...

Mvc relative path using virtual directory..help!

When i drag and drop my image/script/css file into my view, relative path will automatically use to refer on the files. example: <link href="../../Content/style.css" rel="stylesheet" type="text/css" /> <script src="../../Scripts/jquery-min.js" type="text/javascript"></script> <img src="../../Images/logo.jpg" /> It is working fine ...

How to conditionally disable client side validation in xVal?

I am using xVal in a ASP.NET MVC project. One of the forms has two buttons and i want to disable the client side validation when one of the buttons is clicked. Is there a way to conditionally disable client side validation in xVal? ...

How to call popup window in asp.net mvc?

hello i have js file for the popup window. i have used in asp.net but its not working in asp.net mvc can anyone tell me how to use this code in mvc <script type="text/JavaScript"> function openUserSavedListDetailsPopUp(id) { dhtmlmodal.open('UserInfo', 'iframe', 'UserSavedListDetails.aspx?listId=' + id, '', 'wi...

Easy way to convert a Doctrine_Collection of Model classes to an array of simple objects?

To clearly separate the Controller and View layers, I do not longer want to pass full objects to my views. Instead I want to pass only arrays and objects that contain the data but do not have any methods. Otherwise a view script would be able to delete Doctrine records or traverse in the object tree to data that was not intended for the ...

dataannotation metadatatype register dll in global.aspx (linq to sql)

I am trying to use dataannotation validation(I am not able to Fire the annotations as yet) in my mvc application. with reference to this article I want to confirm http://www.asp.net/mvc/tutorials/validation-with-the-data-annotation-validators-cs I am using vs 2008 professional edition . Do I really need to download Microsoft.web.mvc.da...

asp.net mvc module wiseapproach or table wise approach

asp.net mvc module wise approach or different controller and repository for each table approach is better? ...

how to call javascript function in html.actionlink in asp.net mvc?

how to call javascript function in html.actionlink in asp.net mvc? i wan to call one method which is in java script but how to call it within html.actionlink in same page thanks in advance ...

Is WordPress MVC compliant?

Some people consider WordPress a blogging platform, some think of it as a CMS, some refer to WordPress as a development framework. Whichever it is, the question still remains. Is WordPress MVC compliant? I've read the forums and somebody asked about MVC about three years ago. There were some positive answers, and some negative ones. Whi...

ASP.NET MVC - ViewModels For Edit

Is it generally a good practice to have both view and edit models for an MVC app? Meaning, I wouldn't want validation attributes on a view model since it's basically read-only. ...

Unity IoC and MVC modelbinding

Is it ok to have a static field in my controller for my modelbinder to call ? Eg. public class AuctionItemsController : Controller { private IRepository<IAuctionItem> GenericAuctionItemRepository; private IAuctionItemRepository AuctionItemRepository; public AuctionItemsController(IRepository<IAuctionItem> genericAuctionIt...

How do you keep Cocoa controllers from getting too big?

Hello! Do you have some tricks or techniques to break Cocoa controller classes into smaller chunks? I find that whatever I do the controllers end up being one of the more complicated classes in my design. The basic stuff is simple, but once I have several pop-overs or action sheets running, things get uncomfortably complex. It's not that...

Custom rendering logic on server side + MVC + Ajax

I have some rendering logic for custom markup (a'la bbcode, but not bbcode). So that when I'm getting the stuff from DB I'm then calling MyRender.ToHTML(model.text)... Now what I do today is I just have a form below and I do a post and add the item and return the same view. My question is - how to do it with ajax? Should I create a con...

ASP.NET MVC: Posting JSON to Controller

I've got this in my controller: [HttpPost] public void UpdateLanguagePreference(string languageTag) { if (string.IsNullOrEmpty(languageTag)) { throw new ArgumentNullException("languageTag"); } ... } And have this jQuery code POSTing to the controller: jQuery.ajax...

How to parse a url string using mvc2 routes

I'd like to know if there is a simple way of building a RouteValueDictionary from a url. For example if I have a url http://www.site.com/controllerA/actionB/idC, then how can I extract the RouteValueDictionary where the item with the key controller would have the value of controllerA. Note this isn't for testing so I don't want to use m...

can i call model from other views in rails?

Say I have a model called Book. I have a controller named books and related views for this model. Is it possible if I have another controller work with the model Book? Thanks all. :) ...

Post serialized to xml object to mvc action

Hello! i have 2 projects. First project send to 2-nd via http-post requests, as serialized to XML class instances. Ex: <?xml version="1.0" encoding="utf-16"?> <MyObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt; <UserId>test user</UserId> ... How can i recieve it in action o...

Windows Mobile UI Architecture

Hey Guys, I am tasked with rewriting the a mobile client (Win CE, Win Mobile 6 and later) application, because our current implemetation, based on MCSF is no longer usable. I have found this MVC framework: http://blogs.msdn.com/priozersk/archive/2008/10/10/mobile-mvc-framework-part-1.aspx Is this the current hotness? Our needs inclu...