Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Popular Tags...

Tags

 

SnowCovered Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Recently Viewed...

Migrating from ASP.Net MVC 1 to ASP.Net MVC 2

Migrating from ASP.Net MVC 1 to ASP.Net MVC 2 : What should you know?
 
Even though Microsoft had been pushing ASP.Net for years it never had the cool, hi-tech image that some of the other frameworks enjoyed.
 
Serious programmers just didn't take ASP.Net seriously. To them that platform was dumbing down things too much, trying to make things too easy and hiding the true nature of the web. The ASP.Net controls and widgets created an abstraction layer which was too thick to penetrate and spewed markup that was clumsy, clunky and very often impossible to validate.
 
ASP.Net's page life-cycle was also a thorn for serious web-programmers. The event based structure and postback baggage made the webpages slower. Often too slow for creation of serious websites. No wonder then that ASP.Net wasn't compared favorably even with less robust technologies like PHP, and the new kids on the block like Ruby on Rails (RoR) stole thunderous applause.
 
That changed with the launch of MVC. Microsoft took a lot of ideas from RoR and created a new web-designing system that had none of the shortcomings of ASP.Net Classic and many of the advantages of .Net Framework's impressive capabilities.
 
MVC's popularity graph has been shooting up right since launch, and with the launch of the second version Microsoft has added some more new features to it. So if you've been using ASP.Net MVC or have been introduced to it, it's time to find out what's new in ASP.Net MVC 2, and how you can use it.
 
Areas

Early users of MVC complained that the system was too integrated and does not protect individual developers from each other. It also didn't make it easy for the team to work on different parts of the website without disturbing the rest of the code because the entire project shared the same set of Controllers and Models.
 
With the introduction of Areas this problem is solved. Consider an area like a protected sub-website inside the main project that has its own Controllers, Models, Views and Routes. This lets a team of programmers work on the same project, and write their code without worrying about making breaking changes to the main project. This will make it easier to create enterprise level projects by large teams.
 
Templated Helpers
 
Most of us have used the Helper methods in ASP.Net MVC 1. The helper methods could be used to abstract HTML rendering if you wanted. For some people it simplified creating the UI, but the helper methods weren't very smart when it came to understanding data and you had to cast most data to string to render it and if you had specific requirements you had to add markup too.
 
Templated Helper methods are a new addition to ASP.Net MVC 2 that let you create your own Helper method templates that can be used to work with data types and render the markup you want instead of that datatype.
 
Take DateTime for example. You can set up a helper method to show the date in special format instead of casting it everytime. Let's have a look at the code:
 
<%Html.DisplayFor(model => DateTime.Now); %>
 
The template method DisplayFor can be overridden to display the markup you want. All you need to do is to create a partial view in the Shared folder inside views. This view should be named DateTime.ascx (the type of the object to render). Here's the code inside it.
 
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.DateTime?>" %>
 
<%=Model.HasValue == true ? Model.Value.ToShortDateString() : "No Date Specified" %>
 
Notice that in the page type declaration of the control we specify the type of the object (System.DateTime?). Just like we would declare a generic object.
 
Now the DisplayFor method would display the date in Short-date format.
 
Asynchronous Controller
 
It hasn't been said enough times that web is a synchronous medium. You queue a request, the wait for it to be processed and then queue another one. Then at the server end the requests are processed in a synchronous manner.
 
In ASP.Net requests are server by an application pool which assigns every incoming request to a thread. The thread then processes the request and returns the result. During the lifetime of the request the thread is busy and is added back to the pool when it's done.
 
This system works well in more cases but if the server gets too many requests it might consume all of the available threads and refuse any further requests with a Server Busy (503) response. Using Ascynchronous controllers you can overcome this problem by processing the requests in an asynchronous manner.
 
The thread hands over the processing to an asynchronous process and then is free to serve other requests. When the processing completes it might use a different thread than the first assigned to return the generated content.
 
This lets you server a lot more requests, but this is not a feature that everybody will use. Only high-traffic websites will find a use for this.
 
To implement asynchronous processing you must inherit the controller from AsyncController and implement Action methods in two parts Async, and Completed. Here's an example.
 
         public void GetWebFileAsync()
        {
            AsyncManager.OutstandingOperations.Increment();
 
            myAsyncTask myAsync = new myAsyncTask();
            myAsync.SomethingDoneCompleted += (sender, e) =>
                {
                    AsyncManager.Parameters["param"] = e.value;
                    AsyncManager.OutstandingOperations.Decrement();
                };
        }
 
        public ActionResult GetWebFileCompleted(string[] param)
        {
            ViewData.Add("param", param);
            return View("MyView");
        }
 
The Asynchronous controller request is divided into two methods with suffixes: async and completed. Inside the async method you must call your asynchronous code. For each asynchronous call you need to increment the outstanding operations counter of the Asyncmanager and when that call is completed you need to decrement the Asyncmanager's outstanding operations counter.
 
The parameters passed to the asynchronous controller are also handled by the AsyncManager class in a parameters dictionary. When all the asynchronous operations are complete AsyncManager will call the completed method and there you can process your result and return the view.
 
The webpage address, redirecttoaction, and other requests will refer to your method name without the suffixes. Example our method would be called GetWebFile when we want to RedirectToAction to it.
 
RenderAction/Action
 
RenderAction/Action are new Helper methods in ASP.Net MVC 2 that solve an important problem, how to get the results of another Action from within an Action. RenderAction/Action solve this by processing the child-action and outputting the result either as string (Action), or directly to the response object (RenderAction). For practical purposes both are similar, though Action will let you retrieve the generated data as string and modify it further.
 
Here's a small example:
 
<%Html.Action("MySidebar") %>

This will render the Mysidebar action anywhere you place it.
 
Default Value in Action Methods
 
Another interesting little addition. Now you can have default values for parameters in action methods.
 
        public ActionResult Index([DefaultValue(1)] int page)
        {
            ViewData.Add("page", page);
            return View("Index");
        }
 
If you didn't specify the value of the page variable in your url it would get set to a default of 1. Now you have two ways of supplying default values to parameters, either in the route (inside Globals.asax), or in the method body itself which sounds more intuitive.
 
More Validation Options
 
DataAnnotations
 
ASP.Net MVC 2 also expands the validation options you have. The new DataAnnotations validation attributes introduces RangeAttribute, RequiredAttribute, StringLengthAttribute and RegexAttribute that you can decorate your variables with.
 
    public class MyData
    {
        [Required(ErrorMessage="The name is required")]
        public string Name { get; set; }
        [Range(1, 120, ErrorMessage="Invalid Age")]
        public string Age { get; set; }
        [RegularExpression(@"^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$", ErrorMessage="Email address is not valid")]
        public string Email { get; set; }
    }
 
Client-Side Validation
 
Alongside DataAnnotations ASP.Net MVC 2 also has enhanced support for client-side validation. You can hook up the Model-validation to work with client-side validation using the validation javascript files that Microsoft provides in the ASP.Net MVC project itself.
 
HttpPost Attribute
 
Finally a very small addition. Till now we've been decorating the Post Action Methods using the AcceptVerbs(HttpVerbs.Post) attribute. ASP.Net MVC 2 introduces a shorter attribute -- the new HttpPost attribute. So now you can decorate your Post actions with the [HttpPost] attribute instead of AcceptVerbs. 

Share the page?

Migrating from ASP.Net MVC 1 to ASP.Net MVC 2 - share this page - email email - del.icio.us del.icio.us - digg digg - reddit reddit

Feedback Comments

Feedback

SharePoint Web Parts


All Data Springs Web Parts Support WSS 3.0, SharePoint 2007, and SharePoint 2010 Frameworks

Please select license option for each web part you wish to purchase. We highly recommend the SharePoint Bundle to get all Data Springs Web Parts for maximum value!

 

 

      
Cart


Data Springs Sharepoint Bundle

Best Value! The Bundle gives you all 5 web parts in one package at a very attractive price! Best Value! We think you will be very happy with the SharePoint bundle and great price discounts you will receive. With your purchase all of the web parts below will be included.
 
 
 
 

Random Image Web Part

With Random Image for Sharepoint 2007, you can select multiple images to display randomly when the web part loads...
 
 
 
 

Stock Quote Web Part

Giving your site visitors relevant information is critical. With the Data Springs Stock Web Part you can provide your users with up to date financial information
 
 
 
 

Dynamic Image Rotator Web Part

Who would have thought? Adobe Flash® with Sharepoint! The FIRST and ONLY image rotation web part for Sharepoint using Flash Technology from Adobe! The Dynamic Image Rotator displays selected images and then rotates between the images. Several extended and optional features allow you to select the time to rotate each image, fade between
 
 
 
 

SharePoint Charts Web Part

The MOSS Chart Web Part is a web part built by Data Springs for the purpose of rendering several chart types based on data from a SharePoint list on a MOSS 2007 or WSS 3.0 Site
 
 
 
 

Dynamic News Ticker Web Part

Provide current news items with a user-friendly news ticker for your Sharepoint Portal. With millions of web sites offering information you need a fun way to display information and the solution is Flash News Ticker....
 
 
 
 

Tailored Text Web Part

 Tailored Text Web Part allows you to add text/html to your web site that can be different for anonymous users, registered users,  and even individual users specifically.

 
 
 
 

Dynamic Views Web Part

Dynamic Views is an excellent tool to:
Personalization allows you to go the extra mile in communicating or connecting one to one with your clients. When it comes to technology and web site content, you now have the power to leverage this personalization directly with your users on your DotNetNuke® site

 
 
 
 

Dynamic Login Web Part

Your site content isn't vanilla, so why is your portal's login?

Add pizazz and functionality with Dynamic Login! Use custom templates, localization, redirection rules for various roles and many more features!
 
 
 
 


DNN Modules

DotNetNuke Modules


Data Springs offers cost-saving packages that fit your needs:

Purchase the Collection 6.0

Data Springs Collection 6.0

An entire tool chest to quickly build websites and construct complex, powerful, and relevant workflow. Elevate your design with custom registration, forms, displays, reports, user management, payments, Google maps,, SQL updates, and so much more!

Best Value!  Includes all DotNetNuke modules by Data Springs.

$ 495.00

Data Springs User Management Suite 3.0

All the tools you need to enhance user & profile management from A to Z!.  A comprehensive package with 5 feature-packed modules that offer extensive admin controls and easy user interface geared towards an effective and growth-oriented site!  .... more

 

Includes:  Dynamic Registration     Dynamic Login   ♦   Interactive User Import     Dynamic User Directory   ♦   Renewal Reminder    A value of more than $630.00!

 $ 369.00

 

 

Check out all our individual modules!

 

 View Dynamic Registration

Dynamic Registration 5.0 (new release on 6/12/2013)

Need custom fields and workflow for your registration? Get all the power and ease of use to create the registration and profile management just the way you want it... more

$ 199.00

View Dynamic Forms

Dynamic Forms 4.1 (released 5/16/2012)

Whether it's for marketing, sales, contact forms, scheduling, information requests, surveys, or to simply better understand your customer needs, the possibilities for creating powerfully effective forms are now easy and endless! ... more

$ 195.00

 

Dynamic Views 3.1 (new on 2/7/2013)

Now have an easy yet feature-rich reporting module with custom defined display templates and unlimited search options from  Dynamic Forms or any data source like a table, view or custom query!  ... more

$ 169.00

 View Dynamic Login Module

Dynamic Login 4.1 (released 10/19/2011)

Add pizazz and functionality to your site login! Dynamic Login gives you custom templates, localization, redirection rules, SQL Validation, and Single SignOn. Want more? How about Facebook Connect, LinkedIN, and Twitter, too? Your login has never been so exciting!.   ... more

$ 149.00

 View Interactive User Import

Interactive User Import 3.0 (released 8/17/2011)

Interactive User Import provides you with the functionality to easily and quickly import users into DotNetNuke and Dynamic Registration, through a streamlined and well-documented wizard that includes many advanced features... more

$ 149.00

 View Dynamic User Directory

Dynamic User Directory 4.1 (released 4/26/2012)

The perfect compliment for extending your portals users and community! An essential ingredient for managing dynamic user information, is being able to sort key fields and create useful user directories and custom report information... more

$ 179.00

 View Renewal Reminder

Renewal Reminder 1.3

Renewal Reminder provides you with the functionality to setup email notifications for users that their security role will soon expire. After installing your renewal / security role reminder module you can now setup scheduled notifications to be distributed to your users... more

$ 129.99
 View Opt In Email

Opt In Email 5.0 (new on 4/17/2013)

'Relationship Building' and 'Communication' are two essential nuts and bolts for a business to prosper. This module allows you to bridge both of these and easily generate continuous awareness of your web site, products and services. Your prospects and customers will greatly appreciate this feature... more

$ 179.00

 View Tailored Text

Tailored Text 3.0

Personalization allows you to go the extra mile in communicating or connecting one to one with your clients. Leverage the power personalized content on your DotNetNuke site... more

$ 109.99
 View Stock Quote

Stock Quote 1.2

Giving your site visitors relevant information is critical. With the Data Springs Stock Module you can provide your users with up to date financial information... more

$ 109.99
 View Presentation Archive

Presentation Archive 2.0

With so much content on your web site, its important to give users an easy method for finding and retrieving content. Presentation Archive allows you to categorize, organize and present content within your DotNetNuke site for presentations, educational material, videos, and almost any document... more

$ 124.99
 View Real Estate

Real Estate 2.3

Real Estate 2.3 is a feature rich and user-friendly module that allows your portal users the ability to create real estate listings on your site... more

$ 149.99
 View Dynamic Image Rotator

Dynamic Image Rotator 3.3

Dynamic Image Rotator displays selected images and then rotates between the images using the Adobe® Flash® platform.  Several extended and optional features allow you to select the time to rotate each image, fade between images, and also display the images in either sequental or random order... more

$49.99
 View Info Pics Gallery

Info Pics Gallery

The Info Pics Gallery Module allows you to display thumbnail pictures with information to the user about each picture, along with a detailed description regarding the set of pictures and several other optional links... more

 $ 69.99
 View Testimonials Module

Testimonials

The Testimonials Module allows you to display customer testimonials on your site, as well as an easy method for users to submit testimonials about your web site, services, or products... more

 $ 49.99
 View Dynamic Info Cube

Dynamic Info Cube

Take your web site out of the box! Looking for a creative and interesting way to showcase information and content on your site? With millions of web sites offering information you need a fun way to display information and the solution is Dynamic Info Cube... more

$ 99.95
 Search Engine Optimization Cloud Module for DotNetNuke

Dynamic Tags

Nearly every web site developer would agree that search engine optimization is one of key aspects to a successful web site. Part of search engine optimization requires providing search engines that crawl your web site with appropriate and meaningful content... more

$ 69.99
 View Page Tags

Page Tags

'Page Tags' pulls in search terms that users searched to find the current page. There are many benefits to displaying these search words that delivered the user to the site, find our more details ... more

$ 59.99
 Random Rounded Images

Random Rounded Images

Random Rounded Images is an easy to use upgraded version of the images module included with DNN. With RRI, you can select multiple images to display randomly when the module loads. For example, you can add 10 images to the module, and each time you refresh or load the page one of those images will... more

$ 49.99
 View Back on Track

Back on Track

Giving your site visitors fast access to areas of interest is vital to your web site's ease of use and ultimately - sales potential... more

$ 99.99
 

Dynamic News Ticker 2.0

Dynamic News Ticker allows you to scroll through news items in a horizontal or veritical direction with administrative features that allow you to easily customize the look of your news ticker. Each instance of Dynamic News Ticker can be set up to have different sizes, scroll directions, scroll speed... more

$ 39.00
 View Quick Poll

Quick Poll

Give your users a voice, while also providing an important way for you to gather opinions from your users and measure visitors' responses to questions on your site! Polls are significant because they can provide a way for your web site visitors to share ideas and vote on topics of your choosing... more

$ 39.99
 View Flash Contacts

Dynamic Contacts 2.0

Dynamic Contacts is the fastest and easiest way you can help visitors of your website connect with your key personnel... more

$ 79.99
     

 

 

 
 

Join our mailing list...

Get current news and events the easy way
 
 
   
Subscribe Me

Recent Blogs...

 
Copyright 2005 - 2011 by Data Springs, Inc.