mvc

File upload in MVC

Hi all, I'm trying to upload files within MVC. Most solution I saw on SO is use webform. I don't want to use that and personly prefer using streams. How do you implement RESTful file uploading on MVC? Thanks! ...

MVC: does anyone know a multi view design for MVC?

I have a system that need two representations of the same model, and for simplicity i want to use one model, and not keep multiple models - because than my system will suffer from translation errors (the models will not be compatible) that might cause the system to be faulty. Does anyone know a good design practice for that problem? ...

Converting MySQL DATETIME to System.DateTime

I am using a MySQL database with DbLinq, but there is an exception being thrown: "Cannot convert mysql datetime to system.datetime" How can I resolve this issue? ...

Viewing data in a circular buffer in real-time

I have an incoming stream of messages, and want a window that allows the user to scroll through the messages. This is my current thinking: Incoming messages go into single producer single consumer queue A thread reads them out and places them into a circular buffer with a sequential id This way I could have multiple incoming streams s...

ActionLink works locally but doesn't work with Host server. (Host4Life)

So I have this in my Site.Master <%= Html.ActionLink("ABOUT ME", "About", "Home")%></li> Going to AlainaChorney.com (My girlfriends soon to be site) loads up but then clicking the ABOUT ME link dies, and says the file/page isn't there. I've checked the file structure and it is there on the host. When I hover over the link it points...

Creating http based authentication

Is there any open source libraries for creating http based authentication like flickr and remember the milk? ...

Why is my catch all not being executed?

I have a Map Route "Catch All", "{*catchall}", new {controller = "Error", action="NotFound"} which doesn't get executed. This Map Route is preceded by two more routes for Error and NotFound. My local environment gets executed just fine. However, another development machine doesn't and I am getting default 404 error page from inetpub. Can...

How to upload a image from FLEX into ASP.NET MVC?

I have a flex app which takes a picture from webcam and now I need to post it to a MVC controller backend. Any ideas about how to do this? ...

MVC Updatemodel not updating from DropDownList

I have the following on my edit screen: <label for="campaign.CandidateID">Candidate:</label> <%= Html.DropDownList("Campaign.CandidateID", Model.Candidates, "Choose...")%> <%= Html.ValidationMessage("CandidateID", "*") %> and in my controller: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(int id, FormCollection formValues) {...

ASP.net MVC Attribute not executed in overridden controller method

I have a custom attribute which is executing correctly when used in a method in my controller. My Controller "A" is inheriting from Controller "B" and Controller "A" is overriding one of the method of Controller "B". I have my custom attribute applied to that method but it's not executing at all. I tried putting in the base method as we...

Populating the model for a shared view, embedding a shared view within another view

Hi guys, I'm trying to embed a small view snippet that steps through a model fragment that works fine when I embed it in a single controller and pass it to a view like so; Controller: return View(_entities.formTemplate.ToList()); View: http://www.pastie.org/666366 The thing is that I want to be able to embed this particu...

Multistep form in PHP - MVC App

Hello, I'm about to program a mutistep form in my MVC App (Self-made MVC framework) in which no data is to be inserted until the last step is finished. I got the following issues/questions I'd really like to find a kind of pattern to solve this problem, is there any? I want it to be easy the perform a go back action, and get the data...

Refresh ModelState to remove errors

Refreshing the ModelState Hi, I have a question about the ModelState in an ASP.NET MVC controller. When the user selects a certain option from the view, the start date and end date for the "certification" will be set based on the other dates entered. The problem with this is the certification dates come back as null and our Certificat...

How to bind the reference table in MVC?

Hi there I am quite new with Linq to SQL and MVC but I follow the NerdDinner on ASP.NET site. I have tables Tournaments and TournamentTypes which TournamentTypeID is a reference. In my MVC Detail view page, I want to display the TournamentTypeName which is sitting under TournamentTypes object. How do I achieve this? In model class: ...

Keeping jquery/javascript separate from asp.net MVC views?

Hi there, I am trying to found it the best way to keep my scripting i.e. jquery/javascript separate from my view (html) in asp.net MVC... Does anyone have any idea the best way of doing this?? I am seeing alot of code smell in my views ... I have used in the past JavascriptMVC which does a really good job and maybe its a good idea ...

using attach(this); in a GUI program

I'm looking at a GUI program made using MVC and they have this method. What does this method do and when will you need to use it? attach(this); Here is one of the classes with the method. import model.*; import java.awt.*; import java.text.*; import javax.swing.*; public class IncomePanel extends JPanel implements View { private ...

Jquery Popup and JSon Problem in MVC

I have a couple of TextBox controls in a JQuery Popup: <li id="lblAmountPerTurbine"> <label for="AmountPerTurbine"><strong>Amount Per Turbine:</strong></label> <%= Html.TextBox("AmountPerTurbine")%> <%= Html.ValidationMessage("AmountPerTurbine", "*")%> </li> <li id="lblAmou...

How to render the Mvc Mobile View in a iPhone?

Hi I got to a stage that my Mvc mobile view (iPhone) is rendering in a web browser. Eg. Home Mobile iPhone Index.aspx My question is how can I get this View into an iPhone type simulator? I don't know hot to get the mobile view to a nice looking simulator. Any ideas appreciated. ...

How to have a sub view in MVC?

Hi there I am quite new with this MVC in ASP.NET. If I have a page which has Tournament class (in Detail mode) and underneath it has a list of PlayRoundHoles class which it's comes from stored procedure due to a complex quiry. How do I achive this to display this list under Tournament Detail View? I don't quite understand where this Pl...

What is the best practice for adding persistence to an MVC model?

I'm in the process of implementing an ultra-light MVC framework in PHP. It seems to be a common opinion that the loading of data from a database, file etc. should be independent of the Model, and I agree. What I'm unsure of is the best way to link this "data layer" into MVC. Datastore interacts with Model //controller public function...