Contents tagged with ASP.NET MVC
-
Razor Template in ASP.NET MVC 3
Update: There is no need to inherit _ViewStart view class with ViewStartPageWithHelpers in ASP.NET MVC 3 RTM.
-
Using ASP.NET Web Pages Helpers in ASP.NET MVC
Introduction:
ASP.NET MVC 3 includes some helper methods of ASP.NET Web Pages technology that are used for common functionality. These helper methods includes: Chart, Crypto, WebGrid, WebImage and WebMail. For details of these helper methods, please see ASP.NET MVC 3 Beta Release Notes. However there are some other helper methods present in ASP.NET Web Pages and may also be useful for you like Google Analytic, Bing Search, Twitter Profile, Facebook Like etc. For details of all ASP.NET Web Pages helper methods, please see ASP.NET API Quick Reference. In this article, I will show you how to use some of these helper methods in ASP.NET MVC. -
Filtering Razor Generated Output
Introduction:
There is no doubt that Razor view engine is becoming very popular because Razor is speeding things up just a little bit more. With Razor, sometimes it may be need to see the Razor generated HTML during debugging. Sometimes there's a need to filter, change or move the Razor generated HTML. Sometimes you may need to set the different properties of your view in a separate file(however I strongly recommended that you should make your view as simple as possible). Sometimes you may also need to log the Razor generated HTML. Sometimes you may need to emit some HTML in the response output at run time. In this article, I will show you how to can see and filter the Razor generated HTML using a simple way. -
Bug Fixes and Changes in ASP.NET MVC 3 Beta
Update: This article is outdated. Please read this post for the latest new features.
-
Moving ASP.NET MVC Client Side Validation Scripts to Bottom
Introduction:
ASP.NET MVC 2 makes it very easy to enable client side validation in your application, due to which your application users will see the feedback immediately before your form will submit anything to the server. ASP.NET MVC 2 enable client side validation by emitting client side script immediately after the form close tag. But due to performance, developers likes to emit inline script as low in the page as possible, as explained at here. There is another concern of inline script is that javascript that is embedded in the HTML of the page can be seen by search engines. This could be a concern for SEO. For detail of this please see this. Therefore in this article I will show you how to move inline scripts (which is emitted by ASP.NET MVC to enable client side validation) to the bottom. -
Viewing Razor Generated Code
Introduction:
-
Another way to Get Start ASP.NET MVC 3 (Preview 1)
Update: This article is outdated. Now ASP.NET MVC 3 depends on more than one assemblies.
-
ASP.NET MVC with JQuery Validation and ValidationSummary
Introduction:
-
Race Condition in AsyncController
Introduction:
ASP.NET MVC 2 provides AsyncController which enables you to define controller actions that run asynchronously. AsyncController become very useful in IO bound tasks, for example calling a remote web service or query large amounts of data from a slow database, etc. In these situation you will not tie up a request processing thread(ASP.NET thread), instead you use AsyncController which enables you to use non-ASP.NET thread to execute long IO bound operations. AsyncController will increase overall application performance if your application is using long running IO bound task. Synchronization is very important if you are performing multiple task in AsyncController, but if you don't care then your application may come into a situation that we refer to as a race condition. Race condition occurs when several threads attempt to access the same data and do not take account of what the other threads are doing which result in corrupt data structures. So in this article I will show you how your application may come into race condition situation and how you can avoid race condition situation.