One of the things I like about coding "old skool" (web forms) is the AJAX Control Toolkit.
I saw on the Microsoft Storefront video 14, Rob Conery uses the TextboxWatermark control.
When I downloaded the code though, I couldn't find any reference to the Watermark control or any other control from the toolkit nor could I get it to work.
So my question is, does the AJAX Control Toolkit even work in an MVC / AJAX / JQuery type world without viewstate. What do you use for "simple" controls such as Calendar & Watermarks?
jQuery UI has a calendar and other UI components. Also check out the vast number of jQuery plugins.
I've been looking into this question recently and what I've found is that the AJAX Control Toolkit is not easy to use in the "JavaScript only" manner that you'd want to use for ASP.NET MVC. In fact it's a real pain. Here are two examples:
Example 1 - Popup Calendar
Example 2 - Auto Complete Text Field
Neither are easy.
You can give your MVC pages a code-behind and use the AJAX Control Toolkit as you would in regular ASP.NET, but that really violates the whole idea of MVC, so I wouldn't advise it.
My suggestion would be to follow Fredrik Kalseth's advice and use jQuery UI or one of the many plugins. Telerik also has some good looking Open Source MVC Controls that are based on jQuery.
Most of the AJAX Control Toolkit is available in MVC-friendly javascript form off the MS AJAX CDN. These can be used using a jquery plug-in syntax as well.
Related
As I am newbie to JQuery. I have certain questions in mind regarding JQuery.
Can I make complete website with Jquery?
Means in ASP.Net website we use Server Controls to design page, Can we make all this functionality on .ASPX page using JQuery?
If yes, then how to handle server side events?
For designing .ASPX pages, what we prefer to use? JQuery standard controls or Plugin?
No. JQuery is not a server-side framework. It's a client side DOM Manipulation domain specific language and API that enables client-side code to work cross-browser, and includes a variety of utility and helper functions for AJAX, deferred callback resolution, and generic functional programming.
In short, it is not meant to replace your server-side code.
The jQuery framework is only a javascript library which means it can only handle events or actions on the client-side. It doesn't matter what backend you are using for your website (PHP, ASP.Net, Python), javascript only works once the page has been rendered and sent to the browser. Try reading up on the docs for jQuery here: http://docs.jquery.com/
If you have any questions specifically about jQuery programming, we would be more than happy to answer them.
I'm trying to add a functionality to Telerik MVC Q3 chart (I need the chart to show some summary lines, for instance minimum, maximum or average lines). I downloaded the visual studio solution from codeplex, but it's too hard to make any changes because I couldn't find any documentation on this project. I somehow managed to add the server side configuration part, but now I'm really stuck with the javascript part. Could someone advise how can I get the documentation?
Telerik does not have an extensive client-side api. What there is can be found in their docs.
Telerik Extensions for ASP.NET MVC Manual
Under Telerik UI Components, there is a section called "Client API and Events" for each component. For example, Grid Client API and Events.
Telerik Extensions for ASP.NET MVC Demos
The demos all have a small demo of client-side events. For example, Grid Client-Side Events.
Another resource that might be useful on the ASP.NET Wiki is an article by John DeVight called "Telerik MVC : Extending the Client API". Also the Telerik MVC Series might be useful.
Is there any ajax toolkit for asp.net MVC
As MVC does not have ViewState or the Web Forms postback model the AjaxControlToolkit will not work with it.
There is a project to do this (http://mvccontroltoolkit.codeplex.com/) but it's not yet released.
There are numerous blogs where have got different controls working but to be honest I'd suggest looking at jQuery and its plugins (http://www.jqueryui.com/). MVC lends itself far more naturally to these, it is not control-based.
Here's another resource talking about this: http://www.hanselman.com/blog/ASPNETMVCPreview4UsingAjaxAndAjaxForm.aspx
In addition, ASP.NET MVC lends itself quite easily to making your own amazing ajax controls, especially when combined with jQuery.
The emphasis in ASP.NET MVC is more on HTML and client-side code when talking about user-control similar to those in the AJAX Toolkit - you may like to check out the excellent http://www.jqueryui.com/ for some good client-side controls.
I am trying to develop an application using ASP.NET MVC 2 with Spark as View Engine for the Imagine Cup. To win the IE8 award, I must use some features of IE8. I saw that there are some server controls (Web Slice Control, Accelerator Control, Visual Search Control, Browser Helper Control at http://code.msdn.microsoft.com/WebAppToolkitIE8) that help me use the features of IE8. Can I render them using the Spark View Engine?
Why even use server controls? The IE specific functions are simply XML, JavaScript, and/or HTML. You'd probably learn more and have better control over the results by doing it without the controls. I can almost guarantee that Digg, Google, New York Times, and others are not using controls ... and they already have built some ie8-specific features.
Here is some info on each of the ie8 features:
Accelerators in 15 minutes
MSDN info on Slices
MSDN info on Search Providers
You can render user controls to a string and then write them to the page. I have a post how to achieve this. It should work with all view engines since you just have to write a string to the page. There is one restriction - controls that require post back will not work as in asp.net web forms.
Is there a good enough Control toolkit framework for ASP.net MVC that includes useful controls like calendar, tree, grid etc.
Thanks in advance.
From what i know, the most popular and active (in development) is the Telerik ASP.net MVC Components. Demos here.
If you just need a grid, MVCContrib has a good one.
The Mvc Controls Toolkit offers server controls that are comparable with the ones of Web Forms. See here: http://mvccontrolstoolkit.codeplex.com/
Telerik's MVC framework as mentioned above is good; it has a really nice grid, but does not have the calendar/tree components. However, if you can wait until march, it has the other two components you are looking for. See the roadmap at: http://www.telerik.com/products/aspnet-mvc/whats-new/roadmap.aspx.