So I have a simple voting feature on my asp.net mvc page. My index page is loaded with all the posts in the database. A user can vote yes or no as to whether they liked the post or not via links within each post. So in my database I have a table called posts and there are two fields in that table named vote_yes and vote_no that track ...
Hello,
I am preparing a skeleton of ASP.NET MVC application with basic CRUD functions on Products and Parts included in these products. Application contains couple of strongly-typed views based on the MasterPage and now I want to add a widget to display the menu tree. This menu tree is going to reflect the Products/Parts structure so it ...
When a user registers at our site we check the address with an address validation service. This service can return an address suggestion if the entered address is found but has some errors. This sugggestion is returned to the user.
The user can accept the suggestion and is trusted. If he changes the address he is not trusted.
Is there ...
I wonder if anyone can explain why Visual Studio does not report compile errors on the View Pages?
I ask because I noticed that Re-Sharper (At least i think it is) picks up the fact that I have included a dead referance in my view but the project will build.
eg,
<%@ Import Namespace="Site.This.Is.Dead.Link"%>
Its only when navigati...
I have developed an app on a dev machine using ASP.Net MVC and all is fine and it works. I have moved it to the Prod Server and when I type http://mydomain.com I get the error:
The incoming request does not match any route
If I then make a request to http://mydomain.com/pagename I then get a IIS 7 404 page.
It is hosted in a Full Trus...
As a theoretical exercise to help me learn the ins and outs of the membership model with relation to MVC I want to figure out if I can load permissions from an external resource, for the purpose of my prototype I've got a flat file that has a list like so:
Controller1,Method1,Get,Anonymous
Controller1,Method1,Post,User,Administrator
Con...
I've got a number of tables in my db that share common cols: modified by, modified date, etc. Not every table has these cols. We're using LINQ to Enties to generate the
I'd like to create a custom binder class that can handle the automatic binding of these fields. Is there a way to do this without having a custom binding class for e...
Since ASP.NET MVC is still in beta, is it OK to use it in a production environment?
It's gotta be OK since StackOverflow and many other sites use it, right? I've been wanting to try it out, but I know if I propose actually using it on production I will get resistance because it's still in beta.
...
How do you run JavaScript after a Form has been successfully posted and returned?
<% Html.BeginForm(); %>
....
<% Html.EndForm(); %>
...
I have the following hook in my Global.aspx
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
AutoMapper.Mapper.CreateMap<FormCollection, Models.IAmACustomer>().ForAllMembers(form => form.ResolveUsing<Models.FormCollectionValueResolver<Models.IAmACustomer>>());
}
In ...
I currently migrated my project to MVC 2 and IDataErrorInfo doesn't seem to work when using default model binding and validation. Is it cut out?
...
Hi
This is bothering me for some time now. I put all my validation in a service layer. However when I unit test I usually pass everything through action method. Then that goes into my service layer what contains the validation.
So I am not sure now if that is the best way to do it. Since usually they say you should just test that metho...
I'd like to print receipts from my asp.net mvc app. For now I think my best option is to create PDF files, which are easier to handle when they are going to print them, because of the margins/headers/footers/etc.
I don't want to have them configure their browsers just so they can print my receipts, some of them are just not that smart.
...
I'm trying to pass the DELETE to a URL in asp.net MVC using JavaScript but however i always got 405 Method not allow return.
is there anyway to make this work?
FYI: I've put the [AcceptVerb(HttpVerb.Delete)] attribute on my controller.
DELETE /post/delete/8
this is the request
...
I'm experiencing some different behavior after switching from ASP.NET MVC 1.0 to ASP.NET MVC 2 Beta. I checked the breaking changes but it's not clear where the issue lies.
The problem has to do with the default model binder and a model that implements IDataErrorInfo.
The property (IDataErrorInfo.Item):
public string this[string colum...
In my mvc application, i'm having a controller where many actions are their.
I'm having a property for the controller class.
In index controller i'm setting the value for the property ,
will it able to get same value in another action..
public class HomeController : BaseController
{
int sample =0;
public ActionResult Index(int ...
Hi!
I have an asp.net mvc application running on IIS 7. The problem I'm having is that depending on client the response may be recived (as seen through fiddler) as "chunked transfer-encoding. What I can't understand is why this only happens to some of my clients (even if two computers is on the same network with the same browser (IE 8) ...
hello all,
I am getting the following error in my mvc application when I am doing the paging functionality
CS1061: 'System.Collections.Generic.IEnumerable' does not contain a definition for 'HasPreviousPage' and no extension method 'HasPreviousPage' accepting a first argument of type 'System.Collections.Generic.IEnumerable' could be fo...
in my mvc application i'm having a textbox.
Where this application is for libya so i have det the textbox direction to "RTL"
The textbox focus moved teh right, but when typing the each char get append in side of LTR only..
I need when we type it gets append to RTL.
...
Is there anyway when in an MVC view to right click a function call and get to the declaration? Like you can do in the code behind/controllers
...