mvc

ASP.Net MVC Html.Label with Attribute List?

How do I create an ASP.Net MVC Helper for an Html.Label which takes in attributes? Currently when I define an Html.TextBox I am able to pass in a list of attributes. Sort of like below: new {disabled="disabled", @class="pcTextBoxWithoutPaddingDisabled"})%> However, it does not look as though the Html.Label has this feature. As a r...

what should be the role of Controller in gwt applications implementing MVP pattern ?

I am new to GWT and getting back to programming after long gap...my question is about MVP implementation in GWT, I have gone through the following post and they were quite helpfull, but i still have some doubts http://stackoverflow.com/questions/2056/what-are-mvp-and-mvc-and-what-is-the-difference http://stackoverflow.com/questions/123...

asp.net mvc routing, ignore route with extension in the middle of url

Hi How can make the asp.net routing engine ignore routes with an extension of the type /pathtofile/filename.aspx/morepaths I know this is hardly a real scenario but I need to know for another similar issue for an autogenerated url Thanks ...

How to decide on controllers for web application?

I use php and usually structure my application into model-view-controller so its always accessed via index.php with class and method attributes. Class attribute passed as part of URL specifies controller class and method simply method to be called. This seems to be pretty common, but then I'm always having trouble in figuring out what c...

What to return if a controller cannot be found?

I just encountered an error in an MVC app I'm building because the browser requested /favicon.ico which matches a route, but for which there is no controller. What is the recommended way of handling a controller request such as this? ...

Strange behaviour in ASP.NET MVC2 views and partial form

I'm implementing the MS NerdDinner app in ASP.NET MVC 2 and I'm using google maps instead of MS maps. I use sample code from the google site for the maps. I have 2 very simple views, Create.aspx and and Edit.aspx in the same directory, which create and edit dinners respectively. They are very simple - they both render a partial view name...

mvc LinqToSql add row "Select User" for a dropdown list

I'm new to Linq. I have searched and searched the web for a solution, and can't find anything. I have a Linq query and I want to insert a row ("Select User") to the top before I pass it to the drop down list. I've been trying to use the Union but to now avail (it keeps telling me that my object doesn't support the Union method). My code,...

Simple question about MVC

Let's say I have two objects, A and B, both with a model, view and a controller. The user is in the view for A, then presses a button or something that calls an action in the A controller. This action requires some use of the B model. From the action in the A controller, am I supposed to call directly to the B model, or should I be going...

get textbox Array from asp.net mvc generates page

Hi guys, My problem is that i have a dynamic loop in which i generate 5 textboxes and now i need get the data of each index because i want to send by in a array to the controller. Can anybody tell me how i get the values from the textbox arrays. All textboxes have the same name and id but they have an index. ...

Cancel controller action from Initialize()

I have come across a scenario where I have some initialization code on my conrtoller, which might identify an invalid state which will demand some user interaction. There for, I want to redirect the customer to another page/action if that occurs. Since I don't want the initial action to run if I hit this invalid state, I want to cancel ...

ASP.NET MVC Update Address Bar With Ajax Link

Hello, I'm trying to create an ajax-driven gallery where each photo in a sequence is loaded with an Ajax.Actionlink. The user can get to any given photo by passing a parameter to the action method, eg: Gallery/Index?photo=100 The problem is that when the user is cycling through photos with the Ajax.Actionlink's the URL is no longer be...

JQModal MVC 2 validation

Hi: I am using jqModal to allow users to create new contacts from a list by poping a jqModal window, but can't seem to get any validation to work within the modal window. I know that the form is failing because in the contoller the model state is invalid and when I re-render the form nothing shows. I am using ajax events to close the mo...

has any more MVCObject demo ?(google maps v3)

i have a demo : http://code.google.com/intl/zh-CN/apis/maps/articles/mvcfun.html but , i can't understand clearly , so has any more demo about it , thanks ...

iPhone MVC. Problems with the model.

I'm new to programming, iphone application programming in specific. After reading a bunch about MVC I decided to give it a try in a small application. As to my understanding, MVC works like this: Model: data, manipulating data, retrieving data. ViewController: formats data from the model (NSDate to specific style), etc. View: the actu...

Create User by profession - How to Populate/Submit/Validate form?

Hi geeks, I am trying to create user by registration form which contains dropdown for profession in ASP.NET MVC Eg. Individual, professional, manager etc. some fields are common like name & Last Name... some fields are unique by profession... how do i program it with ajax. Thanks ...

PHP: Calling a private method from within a class dying badly

So this might sound a little convoluted. Fingers crossed I come across clearly. I'm working in an MVC framework in PHP. I load a controller /report/index which calls to a helper <? class ReportController extends Controller { public function index() { $foo = MainReport::get_data($_REQUEST); } } ?> ...

ASP.NET MVC: Including MVC partial view in APS.NET Forms pages

We've got old ASP.NET Forms pages and new MVC views and partials views in the same solution. Some pages on the site are MVC, and legacy pages are Forms. One of these legacy Forms pages is an .ascx control. Is there any way for me to insert an MVC partial view (.ascx) into this Forms .ascx control? ...

ASP.NET MVC - Passing a parameter to my action method?

public ActionResult RenderMyThing(IList<String> strings) { return View("RenderMyView"); } How do I pass in strings? routes.MapRoute("MyRoute", "RenderMyThing.aspx", new { controller = "My", action = "RenderMyThing" }); Is there a way I could pass in strings here? Secondly, how does ASP.NET MVC know that ...

ASP.NET MVC - time ajax request

Hi, I'm using a jQuery modal dialog to display a 'Please Wait' type message to a user when a ajax call is made back to the server. I'm doing this by making the dialog visible using the jQuery ajaxSend method. And I close the dialog using the jQuery ajaxComplete method. All fairly routine stuff I'm sure. However if the call takes a ve...

Strange Caching issue with ASP.NET MVC using Linq

Using asp.net MVC in c#, I am making a call to a stored procedure using Linq into my SQL Members table. I have no internal caching on the application, already checked to make sure it is turned off. Test case: I have my username set to test1. From the website I change my username to test2. The website still shows test1. I go to Mana...