I'm trying to use F# for an ASP.NET MVC application. One my controller actions sends an F# list to the view, so I write:
<%@ Page Language="C#" Inherits="ViewPage<FSharpList<int>>" %>
Of course, for this to work, I have to add Microsoft.FSharp.Collections to the namespaces element in my web.config:
<add namespace="Microsoft.FSharp.Co...
How should ASP.NET MVC routes be structured to allow granular role-based access control to business branches?
Every business entity is related to a branch, either by itself or via its parent entities. Is there an elegant way to authorize actions based on user-roles for any number of branches?
1. {branch} in route?
{branch}/{controller...
I have a view with a textbox and a search button, eg CustomerTextBox and CustomerSearchButton.
The list of customers is too long to display in a dropdown, and there has to be advanced search functions anyway.
What is the best practice in MVC to handle this case? When the user clicks on the search button, should it:
A. Load another ...
With the release of MVC2, what noteworthy features are included in the refresh of the MVC Futures library?
...
I am developing a website in ASP.NET MVC using C#. It works fine on my machine, however when I load it to the production server it generates an error trying to present the home page.
The error is caused by the fact that the ASP system is compiling the .ascx pages using Visual Basic, which, of course, does not work since all of the code...
I am looking for best practices in applying business logic to form elements in an ASP.NET MVC application. I assume the concepts would apply to most MVC patterns. The goal is to have all the business logic stem from the same place.
I have a basic form with four elements:
Textbox: for entering data
Checkbox: for staff approval
Checkb...
I am developing a website in MVC 2.0. I want to change the View folder location in my website. I wanted to keep the views folder inside other folders, When I try to do so i am getting following errors
The view 'Index' or its master was not found. The following locations were searched:
~/Views/Search/Index.aspx
~/Views/Search/Index.ascx
...
I have the following situation: I have a class Product that can have a confirmation from various Stations. So I have a ViewModel that holds the Product information, and a list of stations, and all the ProductStationConfirmations.
public class ProductViewModel
{
public Product Product { get; private set; }
public List<Station> Stati...
Hi.
I'm reviewing new features of ASP.NET MVC 2.0.
During the review i found really interesting using Templated Helpers.
As they described it, the primary reason of using them is to provide common way of how some datatypes should be rendered.
Now i want to use this way in my project for DateTime datatype
My project was written for the...
Does anyone know of any tools for generating ASP.NET MVC CRUD User Interfaces (E.g. the controllers and views for Admin tools), given:
A set of model objects.
A set of repositories for retrieving those objects.
Thanks
...
is there some client components (jquery/swf) that will give the possibility to upload and crop (user should be able to select the area to crop) an image in the browser and then send the cropped image to the server
I'm on asp.net-mvc (not sure if it matters)
...
i am working on MVC.Net. in that i have used cascading dropdownlist. I want to do validations for blank field.
the view page coding is:
Select Category:
<%= Html.DropDownList("Makes", ViewData["Makes"] as SelectList,"Sel...
Is it possible to use [RequireHttps] filter with a different port other than 443? I can't find much documentation about it.
...
Hi,
I'm thinking about to write a restful service which is able to upload and stream large video files (GB) (in future it might not only be videos and could also be large documents.
I researched so far and what really makes sense to me could be to use off:
WCF Data Services and Implement IDataServiceStreamProvider and on the back-end ...
I would generate entity framework model of my whole database or do it scenario based with 2-5 tables entity model generation? What is the best thing to do
...
Hi,
I'm new to web development and i'm starting with a MVC project.
I have a view to create a new Service.
In this view, i need to have a button to show a dialog with client names (i also would like to implement filters and paging in this dialog).
Once the user selects a client from the dialog, i need to populate some combo boxes in the...
As i am a beginner to asp.net-mvc which should i use ORM/ADO.NET data services.... As far as i see all the examples are only with ORM support.... So experts please guide me on this...
...
Hi all,
i've started unit testing a while ago and as turned out i did more regression testing than unit testing because i also included my database layer thus going to the database verytime.
So, implemented Unity to inject a fake database layer, but i of course want to store some data, and the main opinion was: "create an in-memory dat...
I'm working on a CMS system which uses a resource file to get information and errormessages from. The client side validation is working without problems, only it's not getting the errormessage from the resource file. While debugging i figured out xval seems to get the errormessages from a javascript file where the messages are set hard-c...
Say I have a model which has a payment date
public class PaymentModel
{
[PaymentDateValid]
public DateTime PaymentDate { get; set; }
}
I have created a custom validator PaymentDateValid deriving from ValidationAttribute. The validator needs to lookup from the database the latest payment date and verify that the submitted payme...