mvc

ASP.NET MVC: deployment issue

Hi, I created an ASP.NET MVC 1.0 application that works fine on my machine (running in vs 2008 web server). However, when I deploy it to my webhost (running in medium trust), I get the following exception on the first hit: could not find file or dependency System, Version 1.0.9.0. Looking at the stack trace, I saw target invocation exce...

How Do Pass a File Path stored in Database to Flash in ASP.NET MVC (VB.NET)

I am using JW Player in an ASP.NET MVC application and I'm trying to pass file path from database. param name="flashvars" value="file=<%ResolveUrl(item.VideoPath)%>&image=preview.jpg" I get nothing for the file path. How can I do this? Thanks ...

how to create google sitemap for mvc site?

Hello there, I was wondering if anyone has done this yet or has any examples on how to create a Google Sitemap for an MVC website. Any help or example would be appreciated. Im talking about this: https://www.google.com/webmasters/tools/docs/en/protocol.html ...

Rails and MVC metaphors

I am working on re-writing my application based on things that I learned at RailsConf 2009. I understand that the Model, Controller and View relate to each other. However, one thing that I have struggled with is the "proper" level for a controller. If the Rails Model maps (roughly) to a database table... And if the Rails View maps (roug...

Retrieve Values From the Controller in JQuery

Hi, I m new to Jquery..How to retrieve the values from my controller and compare them with some String inside JQuery..Please suggest me.. $(".select"+increment).change(function () { if("here i need the value from my controller " =='String') { $("<label id=labelstr"+stringinc+" >"+labe...

Creating a record for an association unobtrusively when attempting access?

I have a simple has_one/belongs_to relationship between two models. This is a new association in my application so there are many records that do not yet have the associated record created. Throughout my application I'm assuming the model has the association and I'm accessing its attributes and methods. However, because the associatio...

Session null in ASP.Net MVC Controller Constructors

Hi, Why is Session null in the constructors of Controllers? It can be accessed from Action methods. Presumably, because the MVC Routing framework is responsible for newing-up a Controller, it just hasn't (re-)instantiated the Session at that point. Does anyone know if this is by design and, if so, why? [I have managed to circumvent th...

progress bars + MVC in Java = ???

So I have this nice spiffy MVC-architected application in Java Swing, and now I want to add a progress bar, and I'm confused about Good Design Methods to incorporate a JProgressBar into my view. Should I: add a DefaultBoundedRangeModel to my controller's state, and export it? class Model { final private DefaultBoundedRangeModel pr...

ASP.NET MVC: Authorization inside an Action - Suggested Patterns or this is a smell?

Hello, I have an ASP.NET MVC application using Authorization Attributes on Controllers and Actions. This has been working well but a new wrinkle has shown up. Object: Shipment Roles: Shipping, Accounting, General User The Shipment moves through a workflow. In state A it can be edited by Shipping only. In state B it can be edited b...

I have my requirements for a mvc web application, now what?

I’m working on a project and have developed the high level user requirements for what the system must do. This project is a php mvc web application built on the CodeIgniter framework. Now I’m trying to take those requirements and break them down further into controllers/actions. What is the best way to do this? I was thinking of cr...

How to implement complex security rules in Ruby on Rails.

I have a system I'm building that seems to call for some complex rules and rather than have a mess of rules through out the system. I was looking to centralize the process. (Which may not be the smartest idea I've had) My most (perhaps least) brilliant idea was to use a seperate class to check any objects before being saved to the datab...

Modelling Users, Groups, Portfolios and Media using an MVC Approach

I am creating a simple design for a social-networking site using the MVC paradigm(in CakePHP) for a project, I have a table called Users which stores all the User Details, I have a Groups Table which stores all the Group details, the relation between these 2 models is has and belongs to many, then I have a group_portfolios table which st...

Tetris and pretty graphics

Say you're building a Tetris game. As any proper programmer, you have your view logic on one side, and your business logic on the other side; probably a full-on MVC going on. When the model sends its update(), the view redraws itself, as expected. But then... if you wanted to add, say, an animation to vanish a line, how would you imple...

Override Interface Builder instantiation of objects?

I'm developing for the iPhone, and I have a class DataManager, that is used to maintain my application data. When the application launches/exits, the data is read from/written to disk to create an instance of this class, using the NSKeyedArchiver (and Unarchiver) classes, since the DataManager adheres to the NSCoding protocol. One probl...

Does ASP.NET MVC use the regular toolbox controls?

In ASP.NET MVC, do I use the "regular" controls from the toolbox and assign data to them like I did with webforms? Can I use the gridview, for example? Thank you. EDIT: The answer appears to be no. So what do you use? Are there any drag and drop controls in Visual Studio like the webform controls? ...

Creating MVC Views that are not HTML

This is a general question about MVC as a pattern, but in this case I am using ASP.NET MVC. I need to create an application whose output is an HTTP-accessed XML stream (content type text/xml). I can do this using traditional ASP.NET using a Generic Handler object. public void ProcessRequest(HttpContext context) { context.Response....

Have I implemented a n-tier application with MVC correctly?

Being pretty unfamiliar with design patterns and architecture, I'm having trouble explaining to others exactly how my latest application is designed. I've switched between thinking it's a pure n-tier, pure MVC and n-tier with MVC in the presentation layer. Currently I think the latter is correct, but I want thoughts from more experienced...

What to learn - Ruby on Rails or ASP .NET MVC...given that am familiar with ASP .NET

I need to learn and adpot the MVC methodology for building web apps. Which is the better way to go given that I have experience with ASP .NET Webforms - ASP .NET MVC or Ruby on Rails? I've heard people going gaga over RoR and its simplicity and its features such as scaffolding, ActiveRecord, convention over configuration etc. However,...

C# object reference not set to an instance of an object.

I am getting the object reference error in just start of the method. For Ex.: 259: public ActionResult ShowAddress(FormCollection formCollection) 260: { In the above sample i am getting the error Line number 260. Please anyone can suggest me the problem with this. ...

In a View page within MVC, what is the preferred way to deal with empty variables

When using the MVC design pattern I usually try to make my view files as simple as possible. Therefore in my View I try not to have lots of code like this: if page title exists display page title else display 'default page title' end if Instead, in my Controller I might use code like this: if no page title is specified ...