Wednesday, February 25, 2009

Ext JS - cross-browser JavaScript library

Ext JS is a cross-browser JavaScript library for building rich internet applications.
  • High performance, customizable UI widgets
  • Well designed, documented and extensible Component model
  • Commercial and Open Source licenses available


Ext JS supports all major web browsers including:

  • Internet Explorer 6+
  • FireFox 1.5+ (PC, Mac)
  • Safari 3+
  • Opera 9+ (PC, Mac)
For download and more info click here

USBTex - Portable Latex

If u have trouble to install Latex on your computer, maybe u can try to use USBTeX.

USBTeX is portable Application for Latex, u dont need to install this program.
All u need to do just extract downloaded USBTeX file and run .bat file, after a few minute configuration latex will be automatic create, and TexMaker Editor will be show in your screen.




For download USBTeX and more information click here

Tuesday, February 24, 2009

Safari 4 has a public beta

It’s a browser. It’s a platform. It’s an open invitation to innovate. Whether on a Mac, PC, iPhone, or iPod touch, Safari continuously redefines the browser, providing the most enjoyable way to experience the Internet.



now they release Safari 4 Public beta

For more detail about new feature in safari 4 click here
For download click here

Monday, February 23, 2009

JavaScriptMVC 1.5 Released

JavaScriptMVC is essential addition to any JavaScript project. Use it alone or with other libraries to organize your projects and direct development. Read more how JMVC reduces development time, enforces best practices, and improves maintainability.

Download here or Here
Getting Started guide introduces click here


Saturday, February 21, 2009

Free Icon Set

If u looking for high quality icon set, u can visit this following link.





Thursday, February 19, 2009

Pixlr.com - Online images editor

If u want to use image editor like photoshop in online version, u can use visit pixlr.com, this website will provide online image editor for u. Pixlr.com also give u free API (Application Programing Interface), a API enables developers to hook the sweet Pixlr to their own web services or applications.



U can also view Pixlr editor in full screen mode


For more info click here

Wednesday, February 18, 2009

TinyChat - Free online chat room

TinyChat is a free service that allows you to create a free chat room that is accessible by anyone with a browser. Simply create a chatroom from the homepage then send the link it gives to you to anyone you want to chat with. After you leave the chat room, all the chat data is gone, so its perfect for secure chats.

Why would you use this? Its the easiest way to have a group chat with multiple people. No more worrying about who has what messenger, or what everyones screen name is. Just send them a link! Its also a great way to talk with people who are not the most computer literate- Now you dont need them to install any programs to talk with someone!



Visit tinychat

Tuesday, February 17, 2009

DotNetNuke Community Edition 4.9.2 Released


DotNetNuke 4.9.2 represents the final planned release for the 4.x codebase. The DotNetNuke 4.x platform has been in production since the launch of Visual Studio 2005 and it is finally time to shift our focus to the new DotNetNuke 5.x platform. We have a lot of great features planned for development and release in 2009, many of which have been high on the list of requested features for some time.

Major Highlights
  • Added the ability to perform permanent redirect from an existing page using the page settings screen.
  • Fixed issue with the permanent forms authentication cookie which cause problems in SSO environments.
  • Fixed issue which required a workaround to import page templates into a portal
  • Fixed a caching issue which prevented modules from being properly cached if they used a specific caching method overload
  • Fixed issue which resulted in an error installing the Broadcast Polling Provider
  • Fixed tab redirect issue which allowed a user to directly navigate to a tab which was supposed to redirect to another URL
  • Fixed a continuous redirect issue which occurred when trying to upgrade from early 4.x releases to 4.9.1
For more info click here

JAWStats - Open Soucre Website Statistics


JAWStats is a free, open-source website statistics and analytics package. It runs in conjunction with AWStats and produces clear and informative charts, graphs and tables about your website visitors.




For download and more info about JAWStats click here

Monday, February 16, 2009

Free 60 Controls from DevExpress

DevExpress give 60 Free Control XtraEditor Library for .Net
For download this free 60 Conrtol from DevExpress, we must register to create username and password in DevExpress website

For more information click here

Wordpress Theme Selector

Wordpress Theme Selector helps you select the perfect theme for your wordpress blog. You can select your theme from a list of hundreds upon hundreds of high quality. All themes are absolutely free for personal and professional use. Many themes are even adsense ready to display your ads. Wordpress Theme Selector saves you time when it comes to choosing that perfect theme for your
site.

Download here

Sunday, February 15, 2009

Debian GNU/Linux 5.0 released

The Debian Project is pleased to announce the official release of Debian GNU/Linux version 5.0 (codenamed Lenny) after 22 months of constant development. Debian GNU/Linux is a free operating system which supports a total of twelve processor architectures and includes the KDE, GNOME, Xfce, and LXDE desktop environments. It also features compatibility with the FHS v2.3 and software developed for version 3.2 of the LSB

Source info: http://www.debian.org/News/2009/20090214

Saturday, February 14, 2009

Delphi-PHP Blog

Today i try to find some tutorial and example for using CodeGear Delphi for PHP, and find this Delphi for PHP blog. This blog containt tutorial and example how to use Delphi for PHP, u can also see totorial in youtube video.

For more info visit this website: http://www.delphi-php.net

Thursday, February 12, 2009

Moonlight 1.0 - Silverlight 1.0 Implementation on Linux

It's an implementation of Silverlight 1.0 for Unix. That includes graphics, video/audio and the JavaScript bridge. It's not Silverlight 2.0, yet, so it has no execution engine. There's no CLR. Rather one uses Javascript to do work.

"Implementation of Silverlight for Unix systems has officially reached its 1.0 level. We are feature complete, we pass all the Microsoft regression test suites and we shipped support for Microsoft's Media Pack for x86 and x86-64 architectures. Moonlight is available as a Firefox plugin that can be installed with a single click from the moonlight download page."

Download moonlight here


Source: http://www.hanselman.com/blog/Moonlight10ReleaseOpenSourceSilverlight10ImplementationOnLinux.aspx

PKS - Podcasting Kits for Share Point

If you or your organizations are interested in podcasting, have SharePoint Server 2007 deployed and about to develop your own podcasting solution then look no further. PKS will save you time, reduce your risk of developing a solution ground-up, and of course will save you money. Moreover, you will find on codeplex a vibrant community of people, organizations and partners who are available to help you, and share with you their own experiences. We strongly recommend that you work with an integration partner for the deployment and maintenance of your own PKS environment. We have listed several partners that we know, but you could just ask your local partner or IT departement to help you out.

PKS is not a traditional Microsoft Product in a sense that it is distributed with its source code, using the Public License license and free of charge (if you already own SharePoint Server 2007). It is not supported by Microsoft, and we recommend that you ask your integration partner for such a support. Since the PKS's code is distributed any partner who understands development for SharePoint 2007 will be able to deliver this support for you.

Download PKS and detail information click here

CKS - Freeware SharePoint Comunity Kits

The Community Kit for SharePoint is a set of best practices, templates, Web Parts, tools, and source code that enables practically anyone to create a community website based on SharePoint technology for practically any group of people with a common interest.

Download CKS here

DBF Converter - Open source application

If you have DBF files and want to convert into SQL Code, you can try use DbfConverter application.
dbfconverter is a small application created with phyton script, you must install phyton runtime file before use dbfconverter, dbfconverter will help you to create SQL Code from your DBF File, this SQL Code can be use to import into any other sql database.

Download dbfconverter click here
Download phyton click here


Enterprise Search from Microsoft

Enterprise search from Microsoft helps you connect people with the information they need to fuel decisions, define purchases, increase productivity – and drive desired outcomes.

Detail information click here

Wednesday, February 11, 2009

Seguelpro - MySQL database management for Mac OS

MySQL database management for MAC OS with good looking UI and Easy to use, the best thing about SequelPro is OPEN SOURCE. Sequelpro is new version of CocoaMySQL project.

Download Sequelpro here

Trackle Feeds You Personalized RSS

Silicon Valley start-up Trackle.com is launching the public beta of its personalized Google Alerts to track pretty much everything in an internet user’s life. Trackle’s technology and interface is innovative and disarmingly comprehensive. It provides real-time personalized RSS feeds of the latest crime in a user’s neighborhood, fluctuating airline ticket prices, how much a user’s house value is down this week, updated job listings, sports scores and much more.

The breadth and specificity of Trackle’s information is what differentiates itself from other RSS tracking applications like Google Alerts, Yotify and Notify.me. Trackle doesn’t just search for keywords, it incorporates change into the keywords and provides up-to-date, highly customized information about ever-fluctuating internet content. For example, if a user is eyeing a camera on sale at Amazon.com but only wants to spend $200, Trackle will monitor the sale and provide you updates of when the camera price reaches $200. Trackle keeps all of this information on the user’s personalized site but the user can also choose to receive the real-time alerts via SMS and e-mail. Imagine if a user is bidding on an Ebay item; Trackle claims to give real-time price updates on an auctioned item. For free.

So who’s behind this nifty idea? Trackle was founded by Silicon Valley serial entrepreneur Pavan Nigam and technology executive Naveen Saxea. Nigam was the founder of Healtheon (a health care start-up that merged with WebMD in 1999) and Cendura (a start-up that was acquired by Computer Associates in 2006). Trackle, who has received seed funding by NEA (New Enterprise Associates) and other angel investors, hopes to morph into “the PayPal of tracking systems” by having a “Trackle” button on websites, such as retail sites, to allow a user to track content instantaneously.

Trackle has already started thinking towards the future by incorporating elements of social networking into the interface. For example, a user can Tweet a Trackle update via Twitter to friends and users can also share their Trackle updates with accepted friends.

Try here: http://www.trackle.com/
Original source: http://www.techcrunch.com/2009/02/10/trackle-feeds-you-personalized-rss/

WordPress 2.7.1 - Maintenance release

2.7.1, the first 2.7 maintenance release, is now available. 2.7.1 fixes 68 tickets. You can automatically upgrade from 2.7 to 2.7.1 via the Tools->Upgrade menu, or you can download the package and upgrade manually.

Download here


Tuesday, February 10, 2009

Favicon Generator

The favicon generator is a simple tool to make generating favicons from any graphic a breeze:

"Although many modern web browsers support favicons saved as GIFs, PNGs or other popular file formats all versions of Internet Explorer still require favicons to be saved as ICO files (a Microsoft icon format). This tool provides an easy way to convert any GIF, PNG or JPEG to ICO which is supported by all modern web browsers. It also enables you to create favicons from scratch via a handy online editor. Additionally the editor lets you manually tweak generated favicons to ensure the best possible result."

Click here to try Favicon Generator

Monday, February 9, 2009

Using jQuery with ASP .NET Tutorial

I found good article how to use jQuery with ASP.NET from DotNetSlackers, for more detail information about this tutorial please visit this following URL :

http://dotnetslackers.com/articles/ajax/Using-jQuery-with-ASP-NET.aspx

FireScope - Firefox add-on integrates with Firebug

FireScope is a Firefox add-on that integrates with Firebug, to extend it with reference material for HTML and CSS.

The extension's core functionality is centered around a new Reference panel, which contains a search tool for looking up HTML elements, attributes, and CSS properties.

The extension also hooks into context-menus in the HTML and CSS panels, the DOM crumbtrail, and the Inspector, adding options to look up a selected item (ie. search for it in the Reference panel) or to view a code example.

Download add-on here

Detail information here

GPhotospace - Firefox extention (Gmail online photo storage)

GPhotospace is a free Firefox 3 extension that leverages Gmail for online photo storage. Within minutes, you can store and share your photos online for free. The process is quick, easy, and doesn’t require any technical knowledge.

GPhotospace is a new way to share photos online.

* Free – It won’t cost you a cent… ever.

* Super Fast – This Firefox extension allows you to seamlessly batch upload up to 50 photos faster than any web-based uploader. In fact, we found that upload speeds exceeded those of Flickr by 5x.

* Lots of Storage – Most free photo-sharing sites provide little storage. Upgrading costs money. GPhotospace leverages the 7GB+ of space offered for free by Gmail to provide reliable hosting.

* Secure Sharing – Sharing using most photo sites exposes your photos to the world. But perhaps you are only looking to share with friends and family. GPhotospace only shares your photos and albums with whom you choose. You have 100% control of your privacy.


Download GPhotoSpace here



Gspace - Use Gmail for online file storage

This Firefox extension allows you to use your Gmail Space (4.1 GB and growing) for file storage. It acts as an online drive, so you can upload files from your hard drive and access them from every Internet capable system. The interface will make your Gmail account look like a FTP host.
After the installation, you'll get an option called "Gspace" in your "Tools" menu, which opens the GSpace window.

It's great for storing/sharing files with your friends. Also very good to backup photos and music files (as you can view/listen to them from Gspace).

If you have any problems with the extension, please look at the FAQ page (http://getgspace.com/faq.html). If your question is not listed or the solution doesn't apply to your specific question, please email the current developer (Fon Labs).

* DISCLOSURE: Gspace uses statcounter.com service to track the usage of the extension

Download here

Download Firefox addons here

LINQ Plugin for jQuery

Original url: http://plugins.jquery.com/project/jLINQ


If you've used the .NET Framework, chances are you've also used LINQ. The features found in LINQ allow you to work with collections in-memory to query, sort and manage data, much like you would with a SQL command. LINQ also allows you to connect directly to a database to manage records all within your IDE.

jLINQ works like .NET LINQ and lets you use commands to query collections that are in memory. jLINQ copies many of the same commands you find in LINQ like skip or take along with certain aggregate functions like sum.

So how does it work? Check out some of the code below.


var results = $.from(data)
.ignoreCase()
.startsWith("firstName","m")
.or("n")
.isNot("administrator")
.orderBy("lastName")
.select();


And that's it! You are returned a nice neat list of values matching what you entered. View the sample for more about the methods and commands!



YUI 2 & YUI 3 Source Code on GitHub

Original url: http://yuiblog.com/blog/2009/01/14/github/


Source for the YUI 2.x codeline and the YUI 3.x codeline have joined YUI Doc on GitHub. Major congratulations are due to Dav Glass, who has led this process for us.

YUI has been accepting external contributions since last summer, but the move to GitHub represents a huge step forward in the process. You can now work with the latest source in both of our major codelines. And if you want to contribute code to the project, we think you’ll find that both Git and GitHub make the process much easier.

There’s a lot of work ahead of us on this:

  1. Migrating our bug reporting and feature request trackers from SourceForge to YUILibrary.com: The cutover will come soon, and we’ll announce that in our forums while redirecting links to the new system.
  2. Documenting YUI build tools and prepping them for GitHub hosting: Once the build infrastructure is on GitHub, you’ll be able to build components from YUI 2.x and 3.x source to verify the integrity of your changes in terms of linting, documentation, and tests.
  3. Moving all documentation and examples into the main repositories: We’re currently updating our example build and site build systems. Once these changes are in place, the source for user’s guides and examples will join the source code in our main repositories and those resources, too, will be easy for you to work with and enhance. Today, only print documentation (in the form of cheat sheets) is included in the YUI 2.x and 3.x repositories.

We hope you enjoy exploring the YUI source code on GitHub, and we’re looking forward to all that lies ahead for 2009.


JSINQ - LINQ to Objects for JavaScript

JSINQ is the JavaScript library that allows you to write SQL-like queries against arrays and DOM node lists.

JSINQ is a complete implementation of LINQ to Objects in JavaScript. What that means is that if you know LINQ and you know JavaScript, you know JSINQ. JSINQ is both an API-compatible implementation of System.Linq.Enumerable and a complete query-expression compiler. That's right: you can write LINQ-style queries in JavaScript. And if that isn't enough: JSINQ is also very liberally licensed, well-document, reasonably well-tested (the Enumerable-part) and currently in beta. So give it a go!

Try JSINQ here
Download JSINQ here


ASP.NET MVC 1.0 - Release candidate

Original url source: http://weblogs.asp.net/scottgu/archive/2009/01/27/asp-net-mvc-1-0-release-candidate-now-available.aspx



ASP.NET MVC 1.0 Release Candidate (RC). Click here to download it (note: the link just went live so if it isn’t working wait a few minutes for the server you are hitting to refresh). It works with both Visual Studio 2008 and Visual Web Developer 2008 (which is free).

Today’s RC is the last public release of ASP.NET MVC that we’ll ship prior to the final “1.0” release. We expect to ship the final ASP.NET MVC 1.0 release next month.

In addition to bug fixes, today’s build includes several new features. It also includes some refinements to existing features based on customer feedback. Please read the release notes that ship with the ASP.NET MVC download for full details on all changes. The release notes include detailed instructions on how to upgrade existing applications built with the ASP.NET MVC Beta to the RC.

Visual Studio Tooling Improvements

The RC includes several new Visual Studio tooling features (above and beyond the existing support in the beta – which I won’t cover here). These features include:

Add Controller Command

You can now type Ctrl-M, Ctrl-C within an ASP.NET MVC project, or right-click on the /Controller folder and choose the “Add->Controller” context menu item to create new controller classes:

This will cause an “Add Controller” dialog to appear that allows you to name the Controller to create, as well as optionally indicate whether you wish to automatically “scaffold” common CRUD methods:

Clicking the “Add” button will cause the controller class to be created and added to the project:

Add View Command

You can now type Ctrl-M, Ctrl-V within a Controller action method, or right-click within an action method and choose the “Add View” context menu item to create new view templates:

This will cause an “Add View” dialog to appear that allows you to name and create a new view (it is pre-populated with convention-based options). It allows you to create “empty” view templates, or automatically generate/scaffold view templates that are based on the type of object passed to the view by the Controller action method. The scaffolding infrastructure uses reflection when creating view templates – so it can scaffold new templates based on any POCO (plain old CLR object) passed to it. It does not have a dependency on any particular ORM or data implementation.

For example, below we are indicating that we want to scaffold a “List” view template based on the sequence of Product objects we are passing from our action method above:

Clicking the “Add” button will cause a view template to be created for us within the \Views\Products\ directory with a default “scaffold” implementation:

We can then run our application and request the /products URL within our browser to see a listing of our retrieved products:

The RC ships with a number of built-in scaffold templates: “Empty”, “List”, “Details”, “Edit” and “Create” (you can also add your own scaffold templates – more details on this in a moment).

For example, to enable product editing support we can implement the HTTP-GET version of our “Edit” action method on our Products controller like below and then invoke the “Add View” command:

Within the “Add View” dialog we can indicate we are passing a “Product” object to our view and choose the “Edit” template option to scaffold it:

Clicking the “Add” button will cause an edit view template to be created with a default scaffold implementation within the \Views\Products\ directory:

We can then run our application and request the /products/edit/1 URL within our browser to edit the Product details:

To save edit changes we can implement the HTTP-POST version of our “Edit” action method on our Products controller:

Notice in the code above how in the case of an error (for example: someone enters a bogus string for a number value) we redisplay the view. The “edit” and “create” scaffold templates contain the HTML validation helper methods necessary to preserve user input and flag invalid input elements in red when this happens:

You’ll rarely end up using a scaffold-created template exactly as-is, and often will end up completely replacing it. But being able to get an initial implementation up and running quickly, and having an initial view template for your scenario that you can then easily tweak is really useful.

Because the scaffold infrastructure supports scaffolding views against any plain-old CLR object, you can use it with both domain model objects (including those mapped with LINQ to SQL, LINQ to Entities, nHibernate, LLBLGen Pro, SubSonic, and other popular ORM implementations) as well as to create scaffolds with custom Presentation Model/ViewModel classes.

Adding and Customizing Scaffold Templates

ASP.NET MVC’s scaffolding infrastructure is implemented using Visual Studio’s built-in T4 templating architecture (Scott Hanselman has a nice blog post on T4 here).

You can customize/override any of the built-in ASP.NET MVC scaffold template implementations. You can also create additional scaffold templates (for example: the “ScottGu Crazy Look” scaffold option) and have them be displayed as options within the “Add View” dialog.

To customize/add scaffold templates at the machine-wide level, open the “C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\MVC\CodeTemplates” folder:

The “AddController” sub-folder contains the scaffold template for the “Add Controller” dialog. The “AddView” sub-folder contains the scaffold templates for the “Add View” dialog:

The scaffold templates populated within the “Add View” dialog are simply text files that have the “.tt” file-name extension. These “.tt” text files contain inline C# or VB code that executes when the template is selected.

You can open and edit any of the existing files to customize the default scaffolding behavior. You can also add new “.tt” template files – like I have above with the “Scott Crazy Look.tt” file. When you add a new template file the “Add View” dialog will be updated to automatically include it in the list of available scaffold options:

In addition to customizing/adding template files at the machine level, you can also add/override them at the individual project level. This also enables you to check-in the templates under source control and easily use them across a team.

You can customize the scaffold templates at a project level by adding a “CodeTemplates” folder underneath your project. You can then have “AddController” and “AddView” sub-folders within it:

You can override any of the default machine-wide templates simply be adding a “.tt” file with the same name to the project. For example, above we are overriding the default “Controller.tt” scaffold template used in “Add Controller” scenarios.

You can add new view-template scaffold files to the list by placing them within the “AddView” folder. For example, above we added a “Yet Another Crazy Look.tt” view template to our project. When we use the “Add View” dialog we’ll now see a union of the templates defined at the machine and project level:

Note: When you add “.tt” templates under the \CodeTemplates folder make sure to set the “Custom Tool” property of each of the “.tt” template files to an empty string value within the property grid (otherwise you’ll get an error trying to run it). You might also need to close and reopen the project to clear a spurious error from the error list. We’ll be publishing more blog posts that cover creating/customizing scaffolding templates shortly.

Go To Controller / Go To View

The RC build now supports the ability to quickly navigate between the Controllers and Views within your projects.

When your cursor is within a Controller action method you can type Ctrl-M, Ctrl-G to quickly navigate to its corresponding view template. You can also perform this same navigation jump by right-clicking within the action method and selecting the “Go To View” menu option:

In the example above we used the “Go To View” command within the “Edit” action method of the ProductsController class. This will cause the \Views\Products\Edit.aspx view template to be opened and have the default focus within VS:

Within view templates you can also now type Ctrl-M, Ctrl-G to quickly navigate to the view’s corresponding Controller class. You can also perform this navigation jump by right-clicking within the view template and selecting the “Go To Controller” menu option:

MSBuild Task for Compiling Views

By default when you do a build on an ASP.NET MVC project it compiles all code within the project, except for the code within view template files. With the ASP.NET MVC Beta you had to roll your own MSBuild task if you wanted to compile the code within view templates. The ASP.NET MVC RC build now includes a built-in MSBuild task that you can use to include views as part of the project compilation process. This will verify the syntax and code included inline within all views, master pages, and partial views for the application, and give you build errors if it encounters any problems.

For performance reasons we don't recommend running this for quick compiles during development, but it is convenient to add to particular build configuration profiles (for example: staging and deployment) and/or for use with Build or CI (continuous integration) servers. Please review the release notes for the steps to enable this.

View Refactoring Support

The names of the files and folders under the \Views application sub-folder will now automatically be updated when you perform controller class rename or action method rename using the “Rename” refactoring command in VS 2008. VS 2008 will apply the standard convention-based naming pattern to existing view files/folders when the Controller class is updated.

View Improvements

The RC build includes a number of view-specific enhancements that were incorporated based on feedback during the preview releases.

Views without Code-Behind Files

Based on feedback we’ve changed view-templates to not have a code-behind file by default. This change helps reinforce the purpose of views in a MVC application (which are intended to be purely about rendering and to not contain any non-rendering related code), and for most people eliminates unused files in the project.

The RC build now adds C# and VB syntax support for inheriting view templates from base classes that use generics. For example, below we are using this with the Edit.aspx view template – whose “inherits” attribute derives from the ViewPage type:

One nice benefit of not using a code-behind file is that you'll now get immediate intellisense within view template files when you add them to the project. With previous builds you had to do a build/compile immediately after creating a view in order to get code intellisense within it. The RC makes the workflow of adding and immediately editing a view compile-free and much more seamless.

Important: If you are upgrading a ASP.NET MVC project that was created with an earlier build make sure to follow the steps in the release notes – the web.config file under the \Views directory needs to be updated with some settings in order for the above generics based syntax to work.

Model Property

With previous builds of ASP.NET MVC, you accessed the strongly typed model object passed to the view using the ViewData.Model property:

The above syntax still works, although now there is also a top-level "Model" property on ViewPage that you can also use:

This property does the same thing as the previous code sample - its main benefit is that it allows you to write the code a little more concisely. It also allows you to avoid using the ViewData dictionary in cases where you want the view template to only interact with the strongly-typed model passed to it.

Setting the Title

The default master-page template added to new ASP.NET MVC projects now has an element within its section. This makes it much easier for view templates to control the element of the HTML page rendered back – and not require the Controller to explicitly pass a “title” parameter to configure it (which was the default with previous ASP.NET MVC builds and we thought questionable from a responsibilities perspective).

For example, to customize the of our Edit view to include the current product name we can now add the below code to our Edit.aspx template to drive the title directly off of the model object being passed the view:

The above code will then cause the browser to render the title using the Product name at runtime:

In addition to setting the element, you can also use the above approach to dynamically add other elements at runtime. Another common scenario this is useful with is configuring model/view specific elements for search engine optimization.

Strongly Typed HTML/AJAX Helpers

One of the requests a few people have asked for is the ability to use strongly-typed expression syntax (instead of strings) when referring to the Model when using a View's HTML and AJAX helper objects.

With the beta build of ASP.NET MVC this wasn't possible, since the HtmlHelper and AjaxHelper helper classes didn't expose the model type in their signature, and so people had to build helper methods directly off of the ViewPage base class in order to achieve this.

The ASP.NET MVC RC build introduces new HtmlHelper and AjaxHelper types that are exposed on the ViewPage base class. These types now allow anyone to build strongly-typed HTML and AJAX helper extensions that use expression syntax to refer to the View's model. For example:

The HTML form helper extension methods in the core ASP.NET MVC V1 assembly still use the non-expression based string syntax. The “MVC Futures” assembly released today (which works with the RC) has a few initial implementations of expression-syntax based form helper methods. We are going to iterate on these a bit longer and then consider adding them into the ASP.NET MVC core assembly in the next release.

You can of course also add your own helper methods (using either strings or strongly-typed expressions). The built-in HTML/AJAX helper methods can also optionally be removed (because they are extension methods) if you want to replace or override them with your own

Form Post Improvements

The RC build includes a number of form-post specific enhancements:

[Bind(Prefix=””)] No Longer Required for Common Scenarios

The RC build no longer requires you to explicitly use a [Bind] attribute (or set its prefix value to “”) in order to map incoming form post parameters that do not have a prefix to complex action method parameters.

To see what this means, let’s implement the “Create” scenario for our ProductsController. We’ll begin by implementing the HTTP-GET version of our “Create” action method. We’ll do this with code below that returns a View based on an empty Product object:

We can then right-click within our action method, choose the “Add View” command and scaffold a “create” view template that is based on a Product:

Notice above how our Html.TextBox() helper methods are referencing the “ProductName” and “SupplierID” properties on our Product object. This will generate HTML markup like below where the input “name” attributes are “ProductName” and “SupplierID”:

We can then implement the HTTP-POST version of our “Create” action method. We’ll have our action method take a Product object as a method parameter:

With the ASP.NET MVC Beta we would have had to add a [Bind(Prefix=””)] attribute in front of our Product argument above – otherwise the ASP.NET MVC binding infrastructure would have only looked for form post values with a “productToCreate.” prefix (for example: productToCreate.ProductName and productToCreate.SupplierID) and not found the submitted values from our form (which don’t have a prefix).

With the RC build, the default action method binders still first attempt to map a productToCreate.ProductName form value to the Product object. If they don’t find such a value, though, they now also attempt to map “ProductName” to the Product object. This makes scenarios where you pass in complex objects to an action method syntactically cleaner and less verbose. You can take advantage of this feature both when mapping domain objects (like our Product object above) as well as with Presentation Model/ViewModel classes (like a ProductViewModel class).

A completed implementation of our Create action method (including basic input type error handling) might look like below:

Now our create action will save the Product object if all values are entered correctly. When a user attempts to create a Product with invalid Product property values (for example: a string “Bogus” instead of a valid Decimal value), the form will redisplay and flag the invalid input elements in red:

ModelBinder API Improvements

The model binding infrastructure within the ASP.NET MVC Release Candidate has been refactored to add additional extensibility points to enable custom binding and validation schemes. You can read more about these details in the ASP.NET MVC RC release notes.

Model Binders can also now be registered for interfaces in addition to classes.

IDataErrorInfo Support

The default model binder with ASP.NET MVC now supports classes that implement the IDataErrorInfo interface. This enables a common approach to raise validation error messages in a way that can be shared across Windows Forms, WPF and now ASP.NET MVC applications.

Unit Testing Improvements

The ASP.NET MVC RC includes some significant improvements to unit testing:

ControllerContext changed to no longer derive from RequestContext

The RC build includes a refactoring of the ControllerContext class that significantly simplifies common unit testing scenarios. The ControllerContext class no longer derives from RequestContext and now instead encapsulates RequestContext and exposes it as a property. The properties of ControllerContext and its derived types are also now virtual instead of sealed – making it significantly easier to create mock objects.

To see how this helps, let’s consider an action method like below that uses both the “Request” and “User” intrinsic objects:

Testing the above action method with previous ASP.NET MVC builds would have required mocking RequestContext and ControllerContext (with some non-obvious constructors that also brought in a RouteData object).

With the RC build we can now unit test it like below (using Moq to mock a ControllerContext for our Controller that allows us to simulate the Request.IsAuthenticated and User.Identity.Name properties):

The refactoring improvements made help out not just with testing Controller actions – but also help with testing filters, routes, custom actionresult types, and a variety of other scenarios.

AccountsController Unit Tests

The ASP.NET MVC Project Template included with the RC build now adds 25 pre-built unit tests that verify the behavior of the AccountsController class (which is a controller added to the project by default to handle login and account management scenarios). This makes refactoring/updating AccountsController easier. The AccountsController implementation has also been modified to more easily enable non-Membership Provider based credential systems to be integrated.

Cross Site Request Forgery (CSRF) Protection

Cross-site request forgery (CSRF) attacks (also referred to as XSRF attacks) cause users of a trusted browser agent to take unintended actions on a site. These attacks rely on the fact that a user might still be logged in to another site. A malicious Web site exploits this by creating a request to the original site (for example: by linking to a URL on the site using a element on the hacker site). The request is made using the user’s browser and thus with the user’s authentication token and credentials. The attacker hopes that the user’s authentication or session cookie is still valid and if so, the attacker can sometimes take disruptive action. You can learn more about this hacking technique here.

The ASP.NET MVC RC now includes some built-in CSRF protection helpers that can help mitigate CSRF attacks. For example, you can now use the Html.AntiForgeryToken() helper to render a hidden input token within forms:

This helper issues a HTTP cookie and renders a hidden input element into our form. Malicious web-sites will not be able to access both values.

We can then apply a new [ValidateAntiForgeryToken] attribute onto any action method we want to protect:

This will check for the existence of the appropriate tokens, and prevent our HTTP-POST action method from running if they don’t match (reducing the chance of a successful CSRF attack).

File Handling Improvements

The ASP.NET MVC RC includes a number of file handling enhancements:

FileResult and File() helper method

The RC build adds a new FileResult class that is used to indicate that a file is being returned as an ActionResult from a Controller action method. The Controller base class also now has a set of File() helper methods that make it easy to create and return a FileResult.

For example, let’s assume we are trying to build a photo management site. We could define a simple “Photo” class like below that encapsulates the details about a stored Photo:

We could then use the new File() helper method like below to implement a “DisplayPhoto” action method on a PhotoManager controller that could be used to render the Photo out of a database store. In the code below we are passing the File() helper the bytes to render, as well as the mime-type of the file. If we pointed a element at our action method URL the browser would display the photo inline within a page:

If we wanted an end-user to be able to download the photo and save it locally, we could implement a “DownloadPhoto” action method like below. In the code below we are passing a third parameter – which will cause ASP.NET MVC to set a header that causes the browser to display a “Save As…” dialog which is pre-populated with the filename we’ve supplied:

When a user clicks a link to the /PhotoManager/DowloadPhoto/1232 URL they’ll be prompted to save the picture:

File Uploading Support

The RC build also includes built-in model-binder support for uploaded files and multi-part mime content.

For example, we could have a

whose enctype attribute is set to “multipart/form-data” perform a post to the /PhotoManager/UploadPhoto URL. If a element was within the form it would cause the file selected by the end-user to be passed to our action method as an HttpPostedFileBase object:

We could then use the HttpPostedFileBase object to get access to the raw bytes of the uploaded file, its mime-type, and optionally save it to a database or disk.

AJAX Improvements

The ASP.NET MVC RC includes a number of AJAX enhancements:

jQuery Intellisense Files included within ASP.NET MVC Project Template

Newly created ASP.NET MVC projects now include both the standard jQuery library (both full and compressed versions), as well as the –vsdoc intellisense documentation file used by Visual Studio to provide richer intellisense support for it (you can learn more about this here):

This enables rich jQuery JavaScript intellisense within client-script blocks and JavaScript files:

Today’s RC build ships jQuery 1.2.6. We are planning to ship the upcoming jQuery 1.3.1 release for the final ASP.NET MVC 1.0 release, and will include an updated JavaScript intellisense file for it.

Request.IsAjaxRequest Property

The Request.IsAjaxRequest property can be used to detect whether a request is being sent from an AJAX call on the client (and is useful for scenarios where you want to gracefully degrade if AJAX is not enabled). The logic within this method was updated with the RC to now recognize the “X-Requested-With” HTTP header (in addition to the form field sent by ASP.NET AJAX). This is a well known header sent by JavaScript libraries such a Prototype, jQuery, and Dojo – and now enables a unified way to check for AJAX within an ASP.NET MVC request.

JavaScriptResult ActionResult and JavaScript() helper method

The Controller base class now has a JavaScript() helper method that returns a new ActionResult class of type JavaScriptResult. This supports the ability to return raw JavaScript that will then be executed on the client by the built-in ASP.NET MVC helper methods. This can be useful for scenarios where you want to cause conditional JavaScript to execute on the client based on server logic.

Summary

We are pretty excited to be in the final “home stretch” of ASP.NET MVC V1. Please report any issues you find with the RC build as soon as possible so that we can get them resolved for the final release. The team plans to carefully monitor feedback over the next few weeks, and assuming no big issues come up ship the official V1 build next month.

Hope this helps,

Scott