There is a study here my co-worker took to my notice. Basically, that in-line form validation is a good thing.
But how would you do in-line multi-field form validation in MVC assuming you already have a "yield return" setup to return a list of form violations? Is the in-line validation only for primitive values like "a zip code should...
We have been using weborb for .net on an existing application for some time now and it has worked very well. We decided to rewrite our application in ASP.NET MVC and now I need to make weborb work with mvc. I have been getting a 404 the resource cannot be found error while trying to connect to the weborb.aspx page. I have added all of th...
Want to add a nice multiple image upload feature to a site so I figured use one that most people already know. This is a .Net MVC App
Anyone know what Facebook uses?
If not, then does anyone know of one that is similar?
...
i'm trying to work out the best method to perform logging in the application i'm currently developing.
right now, i have a Log table that stores the username, timestamp, action, controller, and a message. when a controller is instantiated, it gets the IoC info through Castle Windsor.
for example, my "Sites" controller is created as fo...
I'm trying to set up a messages view with asp.net mvc that will display inbox, etc. What would be a nice tool to utilize for this implementation?
...
Is there a good way in asp.net MVC to trace ModelState errors? IsValid returns false when I submit my form even if there aren't actually any fields in it, or anything being validated. I looked at this thread here and tried Steve Willcock's suggestion but no exceptions are thrown, just a generic error.
Is there any way I can see what is ...
I have a jqGrid on an ASP.Net MVC view. I want to use to pass the value of a hidden text control on the page as an additional parameter to a jqGrid method, when I'm making an in-line edit to a row.
I'm using the postData attribute on jqGrid to do this:
Javascript:
$('#tblLines').jqGrid({
...
postData: {MyId : $('#MyId').val(...
I have a project for which I use StructureMap for dependency injection. The project compiles fine as a MVC project but after moving everything to a MVC2 project I am now receiving the following error:
Test.Web.Controllers.StructureMapControllerFactory.GetControllerInstance(System.Type)':
no suitable method found to
override C:\...
Hi
I am trying to figure out how to tackle this problem. I have to insert some data into 2 tables lets call them Table A and Table B.
Table A has these columns
AId<PK>
A1
A2
A3
Table B has
AId<PK>
A1
B2
B3
B4
Now my first question was should another repository call another repository? I don't think this will solve my current proble...
Hey Everyone,
I'm trying to write some code using pure SQL using ASP.NET MVC.
I assume I should be building a model, and sticking to the MVC pattern.
Any suggestions for good practice would be highly appreciated, and examples very useful too. For example I'm not sure if I should be splitting this code off from my main repository's, an...
Introduction:
Now I know this question could be very broad and it would be too hard to answer without me asking something specific. So All I ask is just some direction, or a brief high level explanation of a design, or maybe there is already some framework out there that could help me get started...I'm not sure.. I have never designe...
I was reading Steven Sanderson's book Pro ASP.NET MVC Framework and he suggests using a repository pattern:
public interface IProductsRepository
{
IQueryable<Product> Products { get; }
void SaveProduct(Product product);
}
He accesses the products repository directly from his Controllers, but since I will have both a web page a...
The ability to let the model handle its own validation has lead me to begin playing with the MVC 2 preview release. So far, I like the simplicity of the validation scheme. However, I have run into a roadblock. This validation style works fine for simple view model objects. For example if I have a model object named car and I'm lookin...
I'm wondering if there is a good example of how to edit ASP.NET Profile settings in MVC using model binding.
Currently I have:
a custom ProfileCommon class derived from ProfileBase.
a strongly typed view (of type ProfileCommon)
get and post actions on the controller that work with ProfileCommon and the associated view. (see code bel...
I'm trying to use the jquery flot graphing plugin with asp.net mvc. I'm trying to dynamically pull data from a JsonResult in order to populate the graph.
My problem is that I can't seem to get the data returned from the JsonResult in the correct format.
Here is my server side code:
public ActionResult JsonValues()
{
I...
Hello,
I'm really new to Castle Windsor IoC container. I wanted to know if theres a way to store session variables using the IoC container. I was thinking something in the line of this:
I want to have a class to store search options:
public interface ISearchOptions{
public string Filter{get;set;}
public string SortOrder{get;se...
I am working on a MVC project and the performance was fine.
On application_start the database gets indexed for the lucene.net search (and on every change on an object the index is extended). But application_start runs on every action I call on the page.
Why is it firing application_start not only once? I will post any code when I know...
In one of the ASP.NET MVC apps we would like to logoff the user automatically if he closes the browser tab in which the app is opened.
We are using the following code when he authenticates.
FormsAuthentication.SetAuthCookie(userName, false)
As of now, if we closes the browser window and relaunch it, users are asked to authenticate ag...
I do have experience with Ruby on Rails, and am programming a project in ASP.NET currently. So having found ASP.NET MVC was awesome for me, since it seems to be a verbatim copy of Ruby on Rails in many respects. However, there are differences, and I have to re-learn quite some things.
One such thing is the way additional (library) funct...
I'm developing a ASP.NET MVC app and I'm wondering which is the best way to handle an expired .NET Forms authentication cookie detected during an ajax call.
Do you think that packing the ajax response into a JsonResult containing info about the cookie validity is the best solution?
...