I've been using Python for most of my web projects lately, and have come to really love the Pylons MVC framework. I like the incredible transparency (lack of magic), the built-in components they selected (sqlalchemy, formencode, routes), and the ability to easily change things up (use a different ORM or templating engine).
Moving forwa...
A short while ago I'm sure I read that is was possible to use AutoMapper to map the validation attributes from the domain model to the view model, i can't find that post any more though!
Has anybody seen any code or know if it would be possible to do this? This would give the added benefit of not repeating validation in both ViewModel +...
Once again I'm confronted with a "This shouldn't be this ?*!# hard" situation.
Problem: I want to use a form in MVC for creation of an object. One of the elements of the object is a set of limited choices - a perfect candidate for a drop down list.
But if I use a SelectList in my model, and a drop down list in my View, and then try to ...
I've been in some discussion recently about where email (notifications, etc...) should be sent in an ASP.NET MVC application. My nemesis grin argues that it only makes sense that the email should be sent from the controller.
I argue that an email is simply an alternate or augmented view through a different channel. Much like I would dow...
I was making an edit to a long existing project. Specifically I added some fields to a table and had to delete the table from the LINQTOSQL designer and re-add it. doesn't Also had to do the same for a view. Mode some other code changes and went to build . Now my project won't build because it can't resolve any of the data context object...
how to add multiple fckeditor field on asp.net mvc page
ok here is the code
<% foreach (var OrganizationMeta in ((IEnumerable<Egovt.Models.OrganizationMeta>)ViewData["OrganizationMeta"])) { %>
<% if (OrganizationMeta.vcr_DateType == "text") { %>
<% TempData["OrganizationMeta"] = OrganizationMeta.vcr_MetaKey + La...
Can anyone with an example help me to create an Asp.Net MVC model as a WCF Service where i can write my entity class, which can be used in my controller to create view
...
Part of my application maps resources stored in a number of locations onto web URLs like this:
http://servername/Issue.aspx/Details?issueID=1504/productId=2345
Is it possible to construct an MVC route that matches this so that I get the path in its entirety passed into my controller? Either as a single string or possibly as an params s...
for(var i=0; i<<%=Model.Mydatalist.Count%>;i++)
{
//then I need to pass i to Mydatalist like Model.Mydatalist[i]
}
//var myJSdata="<%Model.Mydatalist["&i&"]%>";
is not working.. as system see i (i's value) as a string, and will throw exception: cannot convert string to int.
...
I have a subclass of UIView which draws itself based on data held in a corresponding model class, which is a subclass of NSManagedObject.
The problem is, some fields in the data model (e.g. the position of the view) are already held in the view (i.e. the frame property in this case). I then have a data duplication/synchronization probl...
I'm working on a web application. One of my co-workers has written some asp.net forms pages. The page classes all inherit from BasePageClass, which of course inherits from the Page class. I wish to add some MVC controllers that I've been told need to use the same logic implemented in the BasePageClass. Ordinarily, I would want to inh...
I've recently discovered that MVC is supposed to have two different flavors, model one and model two. I'm supposed to give a presentation on MVC1 and I was instructed that "it's not the web based version, that is refered to as MVC2". As the presentations are about design patterns in general, I doubt that this separation is related to Jav...
I have a textbox in my View. I input a number into the textbox, and then i want the controller to multiply the number and put the result into the textbox.
How can I do that?
This is what i have done already.
Let's start with the View:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html PUBLIC ...
I have ASP.NET MVC site with authentication dialog (login/password) that is accessible on every page. When user provides login/password post-back is initiated to special controller, not the same as the one generated the page with dialog.
I do some authentication stuff and wish to return user's browser to the same page request came from...
If you were to start a brand new java project today with the following requirements:
high scale (20k + users)
you want to use something that is fairly mature (not changing dramatically) & wont be dead technology in 3 years
you want something very productive (no server restarts in dev, save the code and its automatically compiled and de...
Is it possible to implement the Model-View-Controller pattern in Java for Android? Or is it already implemented through Activities? Or is there a better way to implement the MVC pattern for Android?
...
Let's say I have this Controller:
public class GlobalizationController : Controller
{
public JavaScriptResult GlobalizedLabels(string virtualPath)
{
return new JavaScriptResult();
}
}
I want the controller to handle (i.e. invoke from) any of the relative URLs below:
/globalization/~Enlargement/Controls/Container....
Hello,
I am creating an Excel file on a web server, using OleDb to connect the the physical (well as physical as it can be) file and appending records. I am then returning a FilePathResult to the user via MVC, and would like to delete the physical file afterwards due to data protection concerns over the appended records.
I have tried u...
Hi,
I've just started a new project in ASP.net 4.0 with MVC 2.
What I need to be able to do is have a custom hook at the start and end of each action of the controller.
e.g.
public void Index() {
*** call to the start custom hook to externalfile.cs (is empty so does nothing)
ViewData["welcomeMessage"] = "Hello World";
...
On a website I am building I need to allow users to edit their orders. Easy enough. But how do I ensure that a user cannot edit other users' orders? Do I perform checks in the model or in the controller to verify that the order belongs to the authenticated user?
...