asp.net-mvc

What to do about @p LINQtoSQL parameters? What is @p anyhow?

Okay still fighting with doing some SqlCacheDependecy in my Asp.net MVC application I got this piece of code from Microsoft to cache LINQtoSQL, basically what it does is it gets the SqlCommand text from the LINQ query and executes that via the System.Data.SqlClient.SqlCommand which SqlDependecy needs... However there is one slight prob...

How can I get the actionName in a ActionFilter?

this is my old code protected override bool OnPreAction(string actionName, System.Reflection.MethodInfo methodInfo) { if ("|Register|RegisterPage|Login|LoginPage|Logout|Service".ToLower().Contains(actionName.ToLower())) { return base.OnPreAction(actionName, methodInfo); } Customer =...

Get javascript version from browser !=IE in asp.net

In my current logging class I log the browser, browser version and javascript version. The Javascript version I get through HttpContext.Request.Browser.JScriptVersion This works fine for IE, but not for any other browser. Is there another way (not javascript based) to detect the installed javascript version? ...

Should I build my next web app in ASP.NET MVC?

My team is considering building our next web app using the ASP.NET MVC framework. I am slightly hesitant, as are some others, because it is still only in beta. I really want to dive in because it seems to be a great way of providing clear separation of concerns and improving testability. Should I take the plunge now, while MVC is st...

using MVC view page + $(document).ready

Hi, I've editing this original question as I think I've narrowed down the problem... I have one view in my site that will not let me put $document.ready within a masterpage contentplaceholder. I've stripped this page to the bare bones and the only thing that is special about it is it has a custom route in global.asax routes.MapRoute(...

Is there a perfect code generation tool to generate MVC Storefront?

Does anybody know a good code generation tool (other than Subsonic because it doesn't support IQueryable in current version) to generate repository and other projects in a way Rob Conery worked in MVC Storefront? ...

ASP.NET MVC framework port for Java EE?

So I've played some with the new, not yet final release of ASP.NET MVC framework and I find it to be very nice and elegant. However at work we are tied to Java for the time being, so I'm wondering this: is there a port of the framework out there for Java people like myself? I realize that webforms isn't going to be available unfortunatel...

How to avoid HttpRequestValidationException in ASP.NET MVC rendering the same view which caused the exception

I just want to know how to validate (or clean) user input in ASP.NET MVC so that an HttpRequestValidationException will not be thrown regardless of the values submitted. For example, with a text input, if the user inputs <BR/>, it will cause an exception and the Yellow Screen of Death will be shown. I don't want that. I want to catch t...

Creating a REST client API

I'm currently looking into options for creating a client API for a RESTfull application. Up until now we have had WCF services to allow all application to connect to the Business Layer and we're growing dissatisfied with it. We already have most of the infrastructure in place for the web (html and json requests) but we need to access th...

How do I implement "create" controller action for a view with many fields in ASP.NET MVC

I'm new to ASP.NET MVC so this may be a stupid question. I have an account object that has many parameters. I've figured out a strategy to break this down into a "wizard"-like interface that will walk a user through collecting the required fields to create the initial business objects. It will then step through pages to collect other, ...

ASP.NET MVC : Not sure how to make these routes.

Hi folks, i'm trying to make the following routes .. and currently i'm going about this in a really long way.. ie. one route instance for EACH route. this is what i'm after... (assuming i'm doing a 'stackoverflow website') / <-- root site /page/{page} <-- root site, but to the page of questions. /tag...

NUnit and Visual Web Developer 2008SP1 - Integration problems

Hey all, I've decided to integrate NUnit with VWD2008. I did the following- 1) Installed NUnit - Ran a Sample project that was included with the installation all the tests were fine. 2) Installed TestDriven.Net 2.0 - Personal distribution. 3) I have written on an MVC Project a test and when I try to right click the context and run the ...

Add a css class with Html.RouteLink

Hi, Does anyone know how I can add a class to the link rendered using the Html.RouteLink helper method in ASP.Net MVC, it has the htmlAttributes object as the last parameter which I assumed I would be able to use, but since class is obviously a reserved word, I cannot supply this as one of the properties on the object. ...

How do you use the jQuery blockui add-in with MVC Ajax?

I have been reading the post here: http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/ But it wants to use the following object: Sys.WebForms.PageRequestManager.getInstance() Which doesn't exist when using the MVC AJAX code. Has anyone tried to hook when the postback ends from MVC AJAX to know whe...

How to test custom Model Binders in ASP.NET MVC?

I've written some custom model binders (implementing IModelBinder) in our ASP.NET MVC application. I'm wondering what is a good approach to unittest them (binders)? ...

Can you recommend alternative FileUpload control for asp.net-mvc?

Currently using System.Web.UI.WebControls.FileUpload wrapped in our own control. We have licenses for Telerik. I wanted to know if anyone had experience with that or could suggest a better one? Some criteria to be measured by validation peformance multiple files localisation (browse is difficult) security ...

OpenId development while disconnected from Internet

What solutions have people come up with to develop their web applications offline when they made the decision to use OpenId for site membership? Couple of ideas: Create two login pages one for OpenId and one for ASP.NET Membership Create local OpenId provider with test accounts Any thoughts? ...

How to develop "shippable" components for ASP.NET MVC?

In ASP.NET webforms we have server components, that can be encapsulated into an external assembly and shipped as product. In ASP.NET MVC we don't have server components, so what's the best option for external components? Looking around it seems like the only possible option is making an Html helper method that returns a bunch of html + ...

Who knows a good free open source forum in C#?

For a project I need an open-source free simple forum in C# and ASP.NET (ASP.NET MVC is preferred!). Does anybody know any? ...

How can I set up a timed interval in javascript?

The following javascript should setup an interval so a new item from the list of json objects will be added to the top of the list slowly, but instead they are all added at the same time. <script type="text/javascript"> var json; var count = 0; $(document).ready(function() { $.ajax({ type: "POST", url: "/Home/PublicTimeLine",...