-
|
One of the upcoming new features being added to ASP.NET MVC 2 Beta is a little helper method called Html.RenderAction and its counterpart, Html.Action . This has been a part of our ASP.NET MVC Futures library for a while, but is now being added to the Read More......( read more ) Read More...
|
-
|
Today at PDC09 (the keynote was streaming live ), Bob Muglia announced the release of ASP.NET MVC 2 Beta . Feel free to download it right away! While you do that I want to present this public service message. The Beta release includes tooling for Visual Read More......( read more ) Read More...
|
-
|
Dear readers, as you know that we have released our beta few weeks back, we are currently looking for your feedback on the existing features as well as the features that you would like to see in our next release. This is a very short survey only 4/5 screens to complete, click here to submit your valuable feedback . Thanks in advance for your precious time. Read More...
|
-
|
In an earlier post I talked about writing a Transaction attribute for MVC using NHibernate (though it isn’t really NHibernate specific). The basic idea is that when an action marked with [Transaction] is executing (OnActionExecuting) you begin a transaction, and some time later (I use OnActionExecuted, but Kazi Manzur Rashid makes a good argument for OnResultExecuted ) you commit that transaction if there was no error, or rollback if there was an error. With that in mind, the implementation details aren’t really important because my motivation in this post is to make every action transactional by default. Most of the actions on any real site will require retrieving, updating, saving or removing data so as a best practice I...
|
-
|
I was asked the other day how to process a long running task asynchronously using ASP.Net MVC along with JQuery to update a progress bar on the view via Ajax. There are many ways of accomplishing this type of multithreading, in this blog I’m going to document one of the simplest and easiest to implement (this solution is really for small apps). Firstly, create a class that will manage the long running task – as this is a contrived example without the use of a database, the class is going to have static dictionary property that will store the unique key and status of each long running task. – the dictionary is used to allow for multiple users firing off individual long running tasks. using System.Collections.Generic; using System.Threading; namespace...
|
-
|
Just about two years ago I joined Microsoft . I'm fortunate to work in a home office with a great team that I now lead . We work for the group at Microsoft that runs MSDN , TechNet , ASP.NET , Silverlight.NET , WindowsClient.NET , basically all the Read More......( read more ) Read More...
|
-
|
Scott showed how to render the Grid in a Transaction. Certainly it does the job but in my opinion view component should not be responsible for this kind of cross cutting concerns, instead we can use the Action Filters. Lets see how we can utilize the Action Filter in this scenario instead of modifying the Grid code. What Scott is trying to do is encapsulate the data access operation in a transaction, the Action Filter has several methods which the ASP.NET MVC framework executes in different stages of a request. In this case, we will use the OnActionExecuting which fires before the code enters into the controller method to start a transaction and OnResultExecuted which fires when the view is processed, we will commit/rollback based upon the status...
|
-
|
I learned something new yesterday about interface inheritance in .NET as compared to implementation inheritance. To illustrate this difference, here’s a simple demonstration. I’ll start with two concrete classes, one which inherits from the other. Each Read More......( read more ) Read More...
|
-
|
Telerik recently released their Extensions for ASP.NET MVC which include several great controls, the most immediately useful of which is their Grid control. In the simple (and probably most common) cases the grid works by passing taking an enumerable list of objects (let’s say Northwind Orders for this example) and rendering this out as a table based on a fluent configuration. The benefit of passing in an enumerable list is that Telerik’s Grid will use its data engine and dynamically page, sort and filter your data on the server (aka: at the database), which is a huge win. However, by allowing the Grid to handle your actual database call you lose control of transactional support and you...
|
-
|
In the recent release, there has been few enhancements in the Web Asset Management. One of the new thing that we introduced which was actually requested by the community is Shared Web Asset. In this post, I will show you, how to use it in your ASP.NET MVC Application. In the previous version, you can only define the web assets either in the ScriptRegistrar or StyleSheetRegistrar like the following: <% Html.Telerik() .ScriptRegistrar() .Scripts(scripts => scripts.AddGroup("myScripts", group => group.Add("script1.js") .Add("script2.js") .Add("script3.js") .Combined(true) .Compress(true) ) ) .Render();%> if you want to reuse it in another page, you have to copy the exact same thing. Also the url...
|