asp.net-mvc

Any Asp.net or Asp.net MVC template based system?

Is there any template based system available for .net? I have several domains i want to handle them using a single system. Each domain can have different design. But all will be manage through a single management system. ...

ASP.NET MVC authentication cookie

My web application authentication cookies times out after a day when I try to login again. I'm trying to access the application through a Nokia browser and Internet Explorer and both have the same behavior. This is my Logon process: [HttpPost] [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", ...

ASP.NET Website Administration Tool: Unable to connect to SQL Server database

I am trying to get authentication and authorization working with my ASP MVC project. I've run the aspnet_regsql.exe tool without any problem and see the aspnetdb database on my server (using the Management Studio tool). my connection string in my web.config is: <connectionStrings> <add name="ApplicationServices" connectionStri...

Good repository pattern for asp.net mvc...

I have implemented a repository pattern in my asp.net mvc web application... But i want to know is this a good repository pattern or still can i improve it more... using System; using System.Collections.Generic; using System.Linq; using System.Web; using TaxiMVC.BusinessObjects; namespace TaxiMVC.Models { public class ClientRepos...

how to update a multi value cookie in asp.net mvc

how i can update a multi value cookie in asp.net ...

Passing dynamic data to controller with ASP.NET MVC and jQuery on form submit

I have a website which is basically a single page containing a bunch of dynamic content. In normal operation the user should never leave this page. To handle/report certain errors though, I need to redirect to an error page. So on the error page I want to provide a link back to the normal page which provides the app the information requi...

Custom ASP.NET MVC ActionResult is not executed

I've used the PermanentRedirectResult from here to perform 301 redirects in ASP.NET MVC 1. Since upgrading to 2.0, the 301 response is no longer sent. Instead, a 200 response containing just the class name is sent. Setting a breakpoint indicates that the ExecuteResult method on PermanentRedirectResult is never called. Apparently the fra...

Html.ActionLink (): new { route value} is acting strangely. I don't know where length = 17 parameter is coming from

Hello, I've this link on a page <% = Html.ActionLink(item.Title, "Edit", "ArticleManagement", new { id = item.ArticleDataID })%> and a simple method to receive the article Id public ActionResult Edit(int id) { //Do something } Unfortunately, I'm getting an error" parameter dictionary contains a null value ...

Asp.net MVC + NoSQL Database(Cassandra)

Is there any good/simple asp.net mvc application that uses NoSQL database(cassandra)... Any suggestion... ...

How to configure Ninject for ASP.NET MVC using LinqToSQL and Repository Pattern

I have done some searching around but have not been able to figure out how to bind LinqToSql data context's with specified connection strings into different repositories. This binding is performed in global.ajax when routes are registered. I'm using a fairly standard repository pattern to decouple the LinqToSql infrastructure from my ap...

Automatically set property after component creation with Autofac

Here is the example code: public interface IService<TEntity> { IContext Context { get; set; } //unimportant methods bool Validate(TEntity entity); void Add(TEntity enttity); } public class UsersController : Controller { private IService<User> _service; public MyController(ISe...

asp.net mvc log in architecture options

Hi, i am writing an asp.net mvc c# site which will not use sessions... What are my options for prividing login functionality without sessions? ...

ASP.NET MVC: Default model binder not working on Safari (but does work for Firefox)

Very strange issue... I have something like this in my Controller: public ActionResult Initialize(IEnumerable<MyModel> Requests) { ... } I generate form elements in my submitting View that look like this: Requests[90ed54f6-4650-44c7-8cc2-c4d225a9a334].Name Requests[90ed54f6-4650-44c7-8cc2-c4d225a9a334].Address Requests[db67e8e5-94f8...

Most productive way to use ViewModels, Data Annotation based validation and Domain Objects?

I am using NHibernate for persistence and have my domain model mapped out. I am using MVC2 and I am keen to use the built in model validation for all basic validation (string length, range, etc). The problem is that I'm finding that there is a huge amount of work involved in this. I have 26 POCO classes representing the domain. Which...

Handling null values in asp.net mvc DisplayForModel

I'm not sure how to best explain this so I have linked to a picture that shows the problem. I have a simple table that I render and for each td item it calls DisplayForModel() so that I can render different things inside the table. The problem I am having is when a database record has null values. For example in this screenshot the Ad...

Implementing multiple file upload control in jquery tabs

Im using asp.net mvc 2. I have three jquery tabs. In each of three tabs i want to upload multiple files and save on server. what may be the best approach to do this also i want to implement ajax base file upload ...

How to Generate HTML from within ASP.NET MVC?

Hi guys My english very terrible, so i cant explain very clear. I will try my best. is it possible to generate HTML code from within ASP.NET MVC, please? This is Controller public class HomeController : Controller { public ActionResult Index() { ViewData["Message"] = "Hello ASP.NET MVC!"; ViewData["author"] = ...

how to stick a ContentPlaceHolder as the source of a url in a master page in asp.net mvc

I have multiple pages that have this pattern. <iframe frameborder ="0" src="[someURL]" width="100%" height="900"> </iframe> I want to factor out everything but the URL into a master page so i tried this: Master Page: <iframe frameborder ="0" src=<asp:ContentPlaceHolder ID="Url" runat="server" /> width="100%" height="90...

Model Validation with dictionary

Hi, Say I have a model like so: public class MyViewModel { //some properties public string MyString {get;set;} public Dictionary<string,string> CustomProperties {get;set;} } And I am presenting the dictionary property like this: <%= Html.EditorFor(m => m.CustomProperties["someproperty"]) %> All is working well, however I hav...

modelbinding to custom ui class which contains a list of other custom ui class

Hi, I have a custom class UIPerson, which contains a listItemsForSale() Each UIItem has an int field QuantityAvailable. In my view for Create Person, I have foreach(var i in Model.ItemsForSale) { <%=Html.EditorFor(x => item.QuantityAvailable) &> } this correctly displays a textbox with '1', the default value, but when I change...