I'm trying to find a way to implement file manager functionality in an mvc 2 application. I've looked at jquery etc for ways of doing this. I have been able to implement a simple upload/download functionality with just an input file button and so on, and I have also tried out jquery File Tree (http://abeautifulsite.net/blog/2008/03/jquer...
Hello SO,
I'm using LINQtoSQL to create cascading deletes IE: if Category is deleted then all the Products in that category are also deleted.
I have a Products repository set up already (IProductsRepository) and now I'm working in my Category repository to add the business domain logic for the cascade.
Products repository has this met...
I am exploring Entity Framework 4 with POCO as my Model for an MVC2 web app. The reason I'll need the model and data access code in a separate library is so I can share it with another web application that serves as a portal for our clients to access our data.
My question is, will I lose any of the typical MVC2 Model features by having ...
I'm trying to use Maarten Balliauw's Domain Route class to map sub-domains to the areas in an MVC2 app so that I have URLs like:
http://admin.mydomain.com/home/index
instead of:
http://mydomain.com/admin/home/index
So far, I've only had partial success. Execution is being routed to the correct controller in the correct area, but it...
I am creating a simple ‘site news’ feature on an MVC 2 .net 4 web site. The site news articles are kept in a simple sql data base, actually I’m doing it with Entity Framework Code First and compact sql, consisting of colums articleID, articleDate articleSummary and articleDetail (model.ItemEntry in code below). The articleDetail is a tex...
How do I get properties in my BLL passed down to a ModeView. For example, I have this class in a separate Class Library:
[MetadataType(typeof(PersonMetaData))]
public partial class Person
{
[Bind(Include = "PersonId,DepartmentId,FirstName,LastName,Active,DateAdded,DateDeleted")]
public class PersonMetaData
{ ...
I have a fairly large ASP.NET MVC 2 application that requires a large amount of user profile based data customization. This involves things like adding/removing table columns or applying user specific column headers in data returned by AJAX requests. There are dozens of types of customizations possible and there are many permutations sup...
Let's say I have the following selectlist (Countries) in a ViewModel:
//..
private static string[] _countries = new[] {
"USA",
"Canada",
"Japan"
};
//...
SelectList Countries = new SelectList(_countries, dinner.Country);
//...
And I render a dropdown list in the following fashion:
<%: Html.DropDownListFor(m => m.Dinner.Country, Model...
I was hoping someone could tell me what is wrong here. I have three tables, LU_LOC_Suburb, Listings, ListingMessages.
Listings has the following columns
ID
SuburbID (Coming from LU_LOC_Suburb)
more...
ListingMessages has the following columns
ID
ListingID (Coming from Listings)
more...
I'm trying to create a Messages page ...
I think I may have made a mess of my controllers. I have a fairly simple site that allows users of type "Staff" or "Client" to view Projects. Staff have access to all projects, can add and delete them, add and delete users, assign clients permission to projects, etc.
As it stands this means I have a UserController and ProjectController,...
I client of mines do not care about elegant and well structured code. I am writing the applications from scratch with minimal 3rd party tools. I am using l2s, Recatcha, tinymce, lucene, and structure map.
I would like to quickly get the clients product to the market as fast as possible while sacrificing elegant code. Are there any too...
Hello,
I'm creating some kind of auction application, and I have to decide what is the most optimize way for this problem. I'm using BL Toolkit as my OR Mapper (It have nice Linq support) and ASP.NET MVC 2.
Background
I've got multiple Category objects that are created dynamically and that are saved in my database as a representatio...
Hello I'm using visual studio 2008 with asp.net mvc 2. I need anti xss library to santitize an input which is generated by rich text editor (lightweight RTE).
I want to use AntiXss.GetSafeHtmlFragment(input); function.
the problem is that VS 2008 crashes after I reference anti xss dll (it works fine in the first time but than it crashe...
i konw that you can have a period in a querystring parameter, but you cant specify a period in variable names in .net.
The following code obviously does not work, but my external system uses the period in the names. Is there a way to do this?
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(string hub.mode)
{
return View();...
I have a form that is going through some validation before sending an e-mail.
I have tried using this for validation, where the method ValidateInput sets the ModelState depending on the input:
[HttpPost]
public ActionResult Create(FormCollection collection)
{
ValidateInput(collection);
if (ModelState.IsValid == false) return Vi...
Hi, I have a weird question. I have been writing a code to change the view by a <select>'s onchange like this:
<% Html.BeginForm(); %>
<label for="id" >Automat:</label>
<%= Html.DropDownList("id", Model as SelectList, new { @onchange = "window.location.href = document.getElementById('id').options[document.getElementById('id').selectedIn...
Hello i'm in the process of creating my first site in ASP.NET MVC, it is a kind of learn as you go. But i have hit a problem that i just can't find a solution for.
I want my user to be able to create an album with songs and tags attached.
That can be an unspecified number of songs and tags. But there must be a minimum of 5 songs and 2 t...
What approach do you recommend for validating a DateTime on the client side in MVC?
Let's say I have a model with a property named DateOfBirth that is a DateTime, like so.
public class UserModel
{
[DataType(DataType.Date)]
public DateTime DateOfBirth {get;set;}
}
On the View, I have a simple
<%: Html.LabelFor(model=>model.D...
Html.ActionLink, Url.ActionLink and Html.RountLink all of them returns empty url even though the target url is valid and displayed properly from url?
I played the route arount, it keeps return empty url without any exception.
It's asp.net mvc 2 project with .net 3.5
...
public static string ProductHelper(this Product p) {
// Need to get the DisplayName value for p.Name property
}
EDIT:
[MetadataType(typeof(ProductMetadata))]
public partial class Product {
public class ProductMetadata {
[DisplayName("Product name")]
public object Name { get; set; }
}
}
...