mvc

What would cause a 1 second delay added onto all my POSTs on DEV but not LIVE?

Two Win2003 servers running ASP.NET sharing same SQL Server, one is DEV the other is LIVE. They are both clones of each other, one is the development box. The dev box is going really slow but I noticed it even happens on a 404 response even. When I browse to a fake URL with either domain to get a 404, the dev box was like 1.4 seconds and...

Is using a Mail Model in MVC incorrect?

I have built a model in some of my MVC websites to assist with sending emails, generally I do something like this $mail = new Mail_Model; $mail->to('[email protected]'); $mail->from('[email protected]'); $mail->subject('hello'); $mail->body('hello how are you'); $mail->send(); I know the model is meant to model data - so is what I'm do...

Is DWR a MVC ??

I started reading about DWR few days back. Its strikingly different from the usual web-app technologies I have worked on till date (read as huge amount of Struts). One question that invariably comes to mind is can DWR really replace MVC ? One may argue about the usability of MVC but the more mature frameworks like Struts and JSF give lot...

Controller folders and the new Autoloader in Zend Framework

After introduction of Autoloader, I started to port existing ZF app. The immediate error was that IndexController was extended by BaseController, which is now cannot be found, although it resides in application/controllers folder, with other controllers. Does the autoloader paradigm require that BaseController is renamed to My_BaseContr...

Which .net architecture should I implement for 10,000 concurrent users for web application

Hello experts, I need to create a web application for tasks delegation, monitor and generate reports for a organization. I am thinking about ASP.Net and MVC should be the architecture to support so many concurrent users. Is there any other better architecture that I should be looking for ? What kind of server configuration will requ...

Unable to generate a custom path in ASP.NET MVC Master Pages.

I am working in an ASP.NET MasterPage and am having trouble with <link href="..." />. I am trying to substitute in a stylesheet with a specific name: <link href="/Content/Styles/<%=Model.Style%>.css" rel="stylesheet" type="text/css" /> Unfortunately, this creates the HTML output: <link href="/Content/Styles/&lt;%=Model.Style%>.css" ...

How do I move from C#/ASP to Ruby?

I have recently designed a web application that I would like to write in Ruby. Coming from a ASP background I designed it with method and fields and linked them together (in my diagram and UML) like I would do it in C#. However, now that I've moved from a single app to MVC I have no idea where my code goes or how the pieces are linked. ...

spring portlet MVC and request params

Hi, Im setting a number of params in a URL (page.jsp?param1=value&param2=value2). When the url is requested it passes control to a Controller class, extending AbstractConrtoller , which overrides handleRenderRequestInternal to do my logic. Inside here i try to retrieve the request attributes using request.getAttribute and getParameter ...

Architecture of very complex php applications ?

I want to know which php architecture strategies developers use in complex php applications . So far , i know the mvc structure which consists of models, views and controller (and controller plugins which handle with common tasks such as user access controller ). I know some good php frameworks which makes some common stuffs easier .But...

Displaying a image from a database in asp.net mvc

Hi all, I have a view which contains a users id and an image column. Here's what i've tried doing to retrieve the image but i keep getting a box with an red x instead of the actual image. View <td><img src="<%= Url.Action( "DisplayImage" , "User" , new { id = item.id} ) %>" alt="" /></td> Controller public FileContentResult Disp...

How does Url.Action work Asp.net MVC?

This is somewhat related to another question i've asked but i figure why not ask it seperately. If i were to place something like the following in aview <td><img src='<%= Url.Action( "DisplayImage" , "User" , new { id = item.id} ) %>' alt="" /></td> Is it supposed to display this <td> <img src='/User.mvc/DisplayImage?id=U00915441...

Generate PDF files from asp.net mvc

I'd like to print receipts from my asp.net mvc app. For now I think my best option is to create PDF files, which are easier to handle when they are going to print them, because of the margins/headers/footers/etc. I don't want to have them configure their browsers just so they can print my receipts, some of them are just not that smart. ...

controller member

In my mvc application, i'm having a controller where many actions are their. I'm having a property for the controller class. In index controller i'm setting the value for the property , will it able to get same value in another action.. public class HomeController : BaseController { int sample =0; public ActionResult Index(int ...

MVC-Pattern enabling buttons on event in Java

Hey, I'm getting started with the MVC-Pattern right now and have something I'm pondering about. Imagine following case: I've got a view (obviously). In this view the User can select a file and then click a "Load"-Button. As soon as this load-button is clicked, all other components in my gui should be enabled as they are set to "disable...

textbox to rtl inmvc

in my mvc application i'm having a textbox. Where this application is for libya so i have det the textbox direction to "RTL" The textbox focus moved teh right, but when typing the each char get append in side of LTR only.. I need when we type it gets append to RTL. ...

ASP.NET MVC Controller Lifecycle

It's my understanding that the constructor for a controller is not called during each web request. Assuming this is true, what is the lifecycle of a controller? Is is "constructed" upon app start, then cached and invoked with the requestcontext injected into it with each web request? Just to be clear, I'm not asking how to emulate const...

How to display a matrix in Html

Hi. I have 3 classes: class R{ string NameR;} class A{ string NameA;} Class RP { R objR; A objA; bool result; } I use NHibernate so in DB I have a table RP: [Id] [int] IDENTITY(1,1) NOT NULL, [Result] [bit] NULL, [RId] [int] NULL, [AId] [int] NULL I need to display in my view a matrix like this: __ A1 A2 A3 R1 1 ...

IgnoreRoute in ASP.MVC

Hi, I am trying to access a .js file in the views directory. I have an MVC application with /Views/Home/MyControl.ascx I have a js file /Views/Home/MyControl.js I wish to reference the .js file and keep it with the control. I have tried the following entries in the routing, and none seem to work. routes.IgnoreRoute("{resource}...

ASP.NET MVC fuzzy path to the pit of success?

I'm interested in adding ASP.NET MVC to my skillset. However my reticence comes from the fact that there seems to be a lot of "fuzziness" when people talk about implementing applications and how to adhere to the rules of the MVC architecture. I've heard Microsoft quoted as wanting developers to fall into the pit of success. With that ...

How to carry out MVC in developing html/js/css?

Is it possible? The ultimate goal I want to achieve is that: When I want to add a new feature to a page,just do something like: importhtml(html.file); importcss(css.file); importjs(js.file); ...