asp.net-mvc

ASP MVC AJAX link not updating page after it completes

I'm following Stephen Walther's tutorial on safely deleting via POST + AJAX (found here: http://stephenwalther.com/blog/archive/2009/01/21/asp.net-mvc-tip-46-ndash-donrsquot-use-delete-links-because.aspx), but am having problems he did not mention in his article. I modified his code slightly, so that I have an Index.aspx file which cont...

Local ASP.NET MVC Suddenly Very Slow; Load times > 1 minute

Over the last few weeks I've been subject to a sudden and significant performance deterioration when browsing locally hosted ASP.NET 3.5 MVC web applications (C#). Load times for a given page are on average 20 seconds (regardless of content); start up is usually over a minute. These applications run fast on production and even test sys...

Users requesting GET when my form method is POST

I'm seeing an intermittent problem on our web site. Some users are trying to submit forms via GET when my form method is POST. The errors always come from IE users. I have noticed a few UA strings have a reference to "yie8," which I am assuming is Yahoo's IE8 package. I think the Yahoo! toolbar might have something against me, but I ...

Last login time using the ASP.NET Membership API

I want to find out the last login time for a user in my ASP.NET MVC 1.0 application. I'm using the Membership provider for authentication. Although I'm able to retrieve the last login time using: public ActionResult LogOn(string userName, string password, bool rememberMe, string returnUrl) { if (!ValidateLogOn(userName, pas...

radio button helper with 2 buttons

I need to display 2 radio buttons horizontally, where the user can only have 1 selected at a time. Html.Radiobutton doesn't seem to group items together. how can this be achieved? ...

Design Practices - Several Pages with ASP.NET MVC

Is there a specific design practice for MVC type sites that need to have a lot of non-model related pages? I mean, it seems very silly to make a controller action for every single page; Yet at the same time, that seems to be the only way to realistically do it and adhere to standards. Is there any documentation or examples available for ...

Weird ASP.NET MVC links with (A(anythingworkshere))

Google's webmaster tools has started showing some very strange internal links for my site. It appears "normal", but I'm not sure what to make of it. If you use parentheses and put in a single letter, then put literally anything in parentheses after that, the link works. I did a search for any other MVC sites so I could see if they had th...

Post cache substitute a rendered action result

I was wondering if it's possible to take the rendered content of an Action in ASP.NET MVC 1 and output it to a page via post-cache substitution. I know it's possible to use an AJAX request however I'm trying to this on the page render. Also, if you try to use Html.Substitute and use RenderAction from MVC Futures it throws an exception ...

Can't get Database to update using Repository Pattern and LINQ to SQL.

My project has the following setup Controller -> Service (for validation) -> Repository (for LINQ) -> dbml -> Database Controller ''# <AcceptVerbs(HttpVerbs.Post)> - hiding this line so that code formatting looks proper in SO. Function Edit(ByVal user As Domain.User, ByVal id As Integer) As ActionResult If ModelState.IsVali...

Database updating incorrect values when passing object from Controller to Repository.

I've got a Controller ActionResult that looks like this Function Edit(ByVal user As Domain.User, ByVal id As Integer) As ActionResult Dim _user As Domain.User = user If ModelState.IsValid Then If Not String.IsNullOrEmpty(user.UserName) AndAlso _ Not String.IsNullOrEmpty(user.WebSite) AndAlso _ No...

Asp.Net MVC Input Validation still firing after being disabled

I've disabled validateRequest in my web.Config, but the app is still firing the error: A potentially dangerous Request.Form value was detected from the client I've got the following in my web.Config <httpRuntime requestValidationMode="2.0" /> <pages validateRequest="false"> I've also tried the following in my controlle...

ASP.NET MVC and Test Driven Development

I am novice.NET programmer. I've learned C#, Windows Programming, SQL Server 2005, ASP.NET 3.5. I want to ask if it would be difficult or not appropriate for me to start working at a job which requires ASP.NET MVC and Test Driven Development. I've already obtained the book "Pro ASP.NET MVC Framework", but this book overburdens me. So wha...

Delete file, my post don't work?

I got a view where I list files and I got a Delete button but I got problems the delete act like a link (get instead of post). I can't figure out why. I'm on a view that's called EditFiles so I just want to delete the file and kinda refresh the page. Any thoughts on this? [AcceptVerbs(HttpVerbs.Post)] public ActionResult DeletePictu...

ASP.NET MVC Web App - Session Randomly Fails

Hello all, I've a Web App that just recently has began randomly losing sessions. The exact cause is elusive at best, however it seems the session is killed/lost on the server side and results in the user needing to close their browser entirely and relaunch in order to log back in. I wish I could provide some code, but I can't figure o...

What are some alternatives to RedirectToAction?

On my HomeController I have an index action which redirects to the index action of the CustomerController via the RedirectToAction method. In this instance I don't like how RedirectToAction modifies the URL showing mysite.com/Customer. Are there some alternative mechanisms to performing a redirection that will allow me to still leverage ...

Adding FormMethod.Post failed jquery/mvc client validation

I need to be able to give an ID to my MVC form, so this is what I did: <% using(Html.BeginForm(MVC.Account.ActionNames.LogOn, MVC.Account.Name, FormMethod.Post, new { id = "logonForm" } )) { %> which somehow disabled client validation (jQuery / MicrosoftMVCValidation.) If I take out the FormMethod.Post and the id, then validation work...

Controlling JQGrid horizontal scroll bar in ASP.NET MVC Application

Hi, I have come across a problem with my JQGrids horizontal scroll bar in an ASP.NET MVC application. The issue is, i have given a fixed width to the grid, and expect that horizontal scroll bar should appear dynamically when i resize my columns; but it does not, instead, the grid spills out of the page. I have tried to add a div element...

AppFabric vs Unity vs Memcached or possibly any other multi server caching mechanisms

Hi, I am currently in the process of investigating the various different caching mechanisms out there whether they be free or at some cost (minimal preferably). The situation. Currently we have to load-balanced servers that host our web application with a third server being an SQL server. This site is a eShop, and it gets hit quite reg...

What open source software uses ASP.NET MVC

I would like to see how other software is designed using the MVC technology. I am working on a small MVC project and would like ideas on how to design it. The only way to look at high quality code is to inspect other open source projects using the microsofts mvc technology. ...

Mvc dll missing from Msbuild web deploy package

I create a web deploy package from Visual Studio 2010, Build Deployment Package. The items to deploy is set to "All files in this project". I install it on the server using Web deploy, via Import Application in IIS Manager. It installs, but when I Browse the website I get the yellow screen of death, Configuration Error "Could not load...