Can I use jQuery with my ASP.net website/project? - asp.net

I want to make my website look spiffy. Should I use jQuery, or what is better suited to be paired with ASP.net?

jQuery works very well with .NET.

I would highly recommend jQuery UI.
http://jqueryui.com/

JQuery compliments .NET quite nicely. Here is a good blog article that should get you started.

I've can say this with confidence - you can use jQuery with .NET with no issues. I do this all the time.

Absolutely. I don't know that it will necessarily make it spiffy as you asked, but it'll certainly ease your programming work.
AJAX will help with the "spiffiness".
You want really spiffy? Look at Silverlight!

Yes, you can definitely use JQuery for ASP.NET apps. Check out an introductory article on how to get started - Getting Started with JQuery

jQuery works as well with ASP.NET as with any other server platform, because it's just a set of client-side scripts. When you consider its daily usage (such as assigning Thread.CurrentThread.CurrentCulture.DateTimeFormat to jQuery calendar) the final code won't look as short and elegant as advertised. The server controls of ASP.NET AJAX have their own bonuses. In short: if you use ASP.NET and not going to change the platform try standard ASP.NET AJAX facility (possibly with AJAX Control Toolkit). Otherwise starting with jQuery can be much better investment.

Related

Alternatives to asp.net ajax 4.0 templates

Assuming I'm stuck with asp.net web forms (I'd love to use MVC partial views), are there any good alternatives to asp.net AJAX 4.0 client-side templates?
In other words, is there some way to specify some html, with placeholders for data properties, to which I could then bind a JSON result. Are there any good jQuery plugins to do this?
I ask because based on the results I'm seeing from Google, this library doesn't seem to be widely used—most search results are from 2008-2010. This question seems to confirm that suspicion.
EDIT
I despise answering my own question, but this link (jQuery Templates) seems to me to be the best bet. If anyone else has any input, please post.
Definitely consider jQuery Templates. We use them quite extensively in WebForms with ScriptServices as a data provider. There is a very small learning curve.
Also check out KnockoutJS, which integrates seamlessly.
Adam, coincidentally, I am using JQuery to retrieve some server side data calling Web Services via Ajax and binding the result on the client side. On my particular case, I am only showing data in a tabular manner, so I am using the jquery datatables plugin (which is fantastic, in my opinion; the API is well documented and easy to extend if you need to).
If you need to show data differently, I think you'll need to write quite a good amount of boilerplate javascript code.
EDIT: I just saw your link reagarding Jquery Templates and looks really cool. I didn't know it existed :) Thanks!

Coolite equivalent for jquery?

Does anyone know of a well-supported ASP.NET wrapper for jquery (much like the way Coolite works for ExtJS)? I have a lot of ASP.NET web forms experience and really don't like writing javascript. I've found working with raw jquery in the web forms model to be difficult (especially when dealing with animations and handling postbacks).
If not, I'll probably just dedicate myself to Coolite!
jQuery already ships with ASP.Net MVC these days. Have you looked into that? Not sure that it "wraps" the jQuery API per se vs. being used under the hood (I'm not sure, I don't use it).

What is best way to use JQuery in Asp.net

What is the best way to use jquery in asp.net, should I use controls or write inline or mix of both.
Controls are easier to use and save time and Writing jquery in page give more control but take more time. Not all (I mean commonly used) plugins are supported by controls.
There are many jquery controls available on codeplex. If you use any, then tell me which one and why?
You can use JQuery in your ASP.NET application in the same way as using jQuery in any application. Using jQuery with UserControls is a great way to encapsulate functionality and is definitely advised.
The ones to use very much depend on your requirements, You can have a look at the rating from people at www.jquery.com for some idea on how good they are but would advise testing them yourself to see if they do what you require on the platforms you are building for.

What's the effective technology to use for a slick UI in an ASP.NET application?

We are planning to extend an existing ASP.NET application (a real huge one) to have a slicker UI. One of the requiremnents is to have a way to execute server side code without a postback (As an example, say a user clicks on a link or hovers on a link, a popup comes up which executes server side code or makes calls to the database)
We plan to add more functionality that closely aligns with the behavior of a yahoo or a google customized page.
Is UpdatePanels a way to go or should a lot of it be implemented using JavaScript? One of the main requirements is to keep the pages as light as possible and to have good performance. We don't plan on using any 3rd party components.
What technologies are suggested that will help us add UI heavy features in the future?
Edit: Thanks everyone. It appears that the approach to take is to use a JS library such as JQuery and AJAX (from initial research the PageMethod/WebMethod way of doing it)?
Any more suggestions?
I think that UpdatePanels are actually pretty clunky. (Actually, I think ASP.NET is pretty clunky now that I've moved to ASP.NET MVC). If the page is going to be highly interactive, I'd suggest using some sort of javascript framework, like jQuery, Dojo, MooTools, etc. that will allow you to do AJAX easily as well as manage the user experience client-side. MS is distributing jQuery with Visual Studio and has promised to support it, so you might want to consider that when making your decision.
Stephen Walter did a great talk about the next version of ASP.NET Ajax 4.0. It's not an immediate solution but it's interesting to see where Microsoft is going with their Ajax framework.
There's a lot more to ASP.NET AJAX than the UpdatePanel, and a fair amount of it can be done without heavy JavaScript work. UpdatePanel is quite inefficient in terms of the amount of data send over the wire. As with everything, only optimise when you need - but bear in mind that the UpdatePanel is one of the first places to look for your slowdowns.
Just to give you a different answer than everybody else: why not try silverlight?

for AJAX implementation : please suggest

which one should use i have following options available
ASP.NET ajax with its ajax control
toolkit controls
ASP.NET ajax with jQuery
Ajax Pro http://www.ajaxpro.info/
Please suggest which one to use keeping in mind performance and page size.
Please if any one can shed some light on pros and cons of each of the above
Thanks
A month ago I would have chosen Ajax Control toolkit but after spending time behind the scenes with JQuery it will have my personal vote. Especially if using MVC, however I am having great success refactoring a older Ajax websites developed in Framework 2.0.
JQuery offers a lot more then the Ajax control toolkit and it allows more flexibility, definitly something we will see more of in the future if you follow the commitment Microsoft has made into it.
Whichever you use, just avoid using anything that post all the form values. Update Panels is one of those.
That means:
Extenders with the ajax control
toolkit. These imposes limitations
on your code.
JQuery + JSON. Simple service calls. Leverage the same skills for client side as in other platforms.
Ajax Pro. Don't know, so can't say anything about its strengths/weaknesses.
I would stick with JQuery. It works great, and you get skills that work in other platforms :).
for performance + page size, Asp.net MVC + jQuery is the best. But from your option, I think #1 page size can be reduced by g-zip. Personally, I like Ajax control toolkit because it's easy to implement.

Resources