I am working on an MVC site that is the first my company has done, one of the things I find myself doing a lot is creating selectlists in a controller, putting them in viewdata and reading them when creating a html.DropDownList. theer are a few things that strike me as smelly about the way i do it.
1) some pages can repeat lists of thin...
How do I post a form to an external site using an ASP.NET MVC controller?
EDIT: Ok... I have a view with some data on it. After the user completes the form I need to do a postback with a specified form format to an external site (like for paypal). After I posted the constructed form I need to redirect the action to a new view
...
my global.asax looks like this
Imports Castle.Windsor
Imports Castle.Windsor.Configuration.Interpreters
Public Class MvcApplication
Inherits System.Web.HttpApplication
Implements IContainerAccessor
Private Shared IoC As IWindsorContainer
Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.IgnoreR...
I am wondering if including image thumbnail information in the model makes sense. Like specifying what sizes of thumbnails you would like to be created. Thumbnail directory. Etc.
Also when working with thumbnails and a database, Is it advisable to store all created thumbnails as new records in the database. Say you have Image record wou...
If you were an asynchronous javascript call in an Asp.Net MVC environment, and you had to work with a round-robin style of load balancer, would you be able to find your way home?
edit: adding clarification ..using in-memory session state.
...
I'm about to build a web app and I would like to use either SproutCore or Cappuccino. Only thing is, I can't figure out which one to use...
I've been reading about them, and they seem to share the same goals (MVC on the client, with a thin REST server). I understand that they differ in their implementation (Obj-C vs JS), but I'm having ...
I have two classes that each need an instance of each other to function. Ordinarily if an object needs another object to run, I like to pass it in the constructor. But I can't do that in this case, because one object has to be instantiated before the other, and so therefore the second object does not exist to be passed to the first obj...
I've seen a few mentions of this on SO, but staring at Wikipedia and at an MFC dynamic dialog demo did nothing to enlighten me. Can someone please explain this? Learning a fundamentally different concept sounds nice.
Edit: I think I'm getting a better feel for it. I guess I just didn't look at the source code carefully enough the firs...
The question, in brief:
In MVC, how do you distinguish between a checkbox click (or a selectbox or listbox change) from a human meaning "Controller, modify the model", and a checkbox click (or a selectbox or listbox change) from the Controller meaning "I'm updating the view because the model has changed"?
The example:
I have a JS ap...
Ok so I've spent a couple hours trying to resolve this issue and have had no leads so far, keep getting the same 404 error. What happens is the website picks up the Default.aspx page and displays it like it should. But the Home page has a clickable image where it routes to another view page. The image code is like so:
<a href="<%= Url.A...
I want to see in action howto make blog on Eclipse + Java + Mvc Framework? Do anybody see such things?
...
I have two routes:
routes.MapRoute(
"FetchVenue",
"venue/fetchlike/{q}",
new { controller = "venue", action = "fetchlike" }
);
routes.MapRoute(
"venue", ...
For a Yes/No radio button group the following Html is rendered. The correct value of the response.text property is returned to the controller. However, the choiceID property of the hidden input is always "1" (the hidden value from first button).
Also, the two instances of the selection values are returned to the Model List.
ie.
" no, Id...
Would anybody know why my parameter is being "converted" to lowercase when it hits my ASP.NET MVC controller action?
I can only assume it is being converted as looking at data value just prior to the ajax request it is in correct casing, but then when debugging my action method within .NET during the ajax request and checking the incomi...
I currently have code in my ApplicationController to check if a user is logged in and has the required access to perform a given action (the tests take place in a before_filter).
I require the same functionality in the views to decide if I should be showing the admin links in a list view, but how do I best avoid duplicating code in the ...
I'm writing some data analysis software and decided to use such approach:
epn:
model/data.py <- Model definition
model/reader.py <- How to read data into model
view/gui.py <- main gui frame (wx)
view/dialogs.py <- different dialogs (wx)
epn.py <- controller
For communication between gui and data I used wx.lib.pubsub. So when button 'Mo...
Here is my scenario. For the example lets say that I need to return a list of cars based on a search criteria. I would like to have a single View to display the results since the output will be the same, but I need several ways of getting there. For instance, I may have a Form with a textbox to search by year. I may have another sepa...
I am working on ASP.NET MVC.
in order to use AjaxHelper, I inserted two javascript files in the site.master as following.
<script src="../../Scripts/MicrosoftMvcAjax.debug.js" type="text/javascript"></script>
<script src="../../Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script>
then I used AjaxHelper in view pages, but ...
Whenever I try to write graphical programs (whether a game or really any GUI app) I always wind up with one or two god classes with way too many methods (and long methods, too), and each class having far too many responsibilities. I have graphics being done at the same time as calculations and logic, and I feel like this is a really bad ...
i want ask some question about asp.net mvc
Is static constructor will init every user request?
Is static data share for every user?
...