MVC ajax, no javascript fallback? - asp.net

With Ajax ActionLinks, what happens when Javascript is disabled? Does the .NET framework automatically take care of everything so do you specifically need to add support?
Does Webforms have something similiar to ajax actionlinks where it does not post the whole page?

An answer to the second question, yes. Here is a tutorial on partial page post backs with asp.net webforms: http://www.asp.net/web-forms/tutorials/aspnet-ajax/understanding-partial-page-updates-with-asp-net-ajax
The answer to your first question should be very easy to answer with a simple test. Make an simple app, turn off javascript on your browser, find your answer.

Related

calculating total using angularjs and webforms usercontrol

Im new to using angularjs with webforms.
i am using asp.net 4.0 webforms project. It have a usercontrol(uc.ascx) with a textbox and I dynamically multiple of the usercontrols on a page(Default.aspx)..on this aspx page i have a text box which should display the sum of the values in the textboxes of the dynamically added usercontrol..
can some one help me on how i can achieve this?
I researched all over the internet but could find a proper tutorial that works with usercontrols and angularjs
Well I think your are looking into the wrong direction angularJs isn't similar to knockoutJS probably both of them have double binding, but definitely they are very different.
Angular is a Single page application that's built mostly for CRUD's applications, the typical architecture is to use a restFul web service behind angular (which is going to be your front end) and they communicate using JSON as the communitacion format, been that said, I'd suggest to move on ASP.NET web API and angular
this video could be helpful for you to get the whole picture.
EDIT:
Unfortunately i don't have an specific example for your scenario but I've found a couple of articles that may help you on your journey.
A good example of how to use knockout.js and asp.net definetelly you can look at it and take that as a good source for learn it and apply it to your case.
This is another example using a usercontrol with knockoutjs
take a look to this gibhub repo with and example of the proposed architecture

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!

ASP.NET AJAX Client Templates - Jquery Equivalent

I've been looking at ASP.NET AJAX Client Templates.
My position is that I prefer to use Jquery rather than ASP.NET AJAX as I feel this will win the day in the long term.
Are there Jquery plugins/functionaility that provide the same kind of help for rendering that client templates do in ASP.NET AJAX?
John Resig's (jQuery Creator) Microtemplating engine has worked very well for me with ASP.NET.
Rick Strahl has an excellent post on this that details using the Microtemplating engine with ASP.NET and compares it to other solutions at http://www.west-wind.com/Weblog/posts/509108.aspx.
ASP.NET AJAX has some pros and cons as JQuery. You can use them together if you need powerful client-side library. Btw, if you can specify what you are after exactly, maybe we can help more.

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

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.

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