In this screen cast I will demonstrate how swap forms within in a section of your page using jQuery and AJAX.
This technique allows you to make your web sites faster and provide an easier (and better user experience).
In this screen cast I will demonstrate how swap forms within in a section of your page using jQuery and AJAX.
This technique allows you to make your web sites faster and provide an easier (and better user experience).
This post is in response to the several requests I’ve gotten to provide a Razor version of a sample solution I provided a few months ago on Editing records with jQueryUI Dialogs and AjaxForms, which was originally posted using aspx views. If you haven’t read it or seen the video, please take a look at it first; as most of the concepts will remain the same. .
So this solution is practically unchanged compared to the original, however I did I introduced 2 improvements (which could also apply to the aspx version).
[HttpPost] public JsonResult Edit(CarModel model) { if (ModelState.IsValid) { CarModel car = CarRepository.GetCars().Where(c => c.Id == model.Id).FirstOrDefault(); car.Name = model.Name; car.Description = model.Description; return Json(JsonResponseFactory.SuccessResponse(car),JsonRequestBehavior.DenyGet); } else { return Json(JsonResponseFactory.ErrorResponse("Please review your form"), JsonRequestBehavior.DenyGet); } }
Continue reading “ASP MVC3 – Editing records with jQueryUI Dialogs and AjaxForms – Razor Version”
For the past couple of years, after we started our move towards ASP.Net MVC, we have been using more and more ajax to enrich our user interface and we love it.
At the begining we use to send our responses as simple strings (true/false) or very customized Json responses. However, for the past year or so we’ve been using Standard Json Responses and it has been working great. I’ve passed this idea to a couple of friends and everyone seems to like it so here it is.
Objective & Advantages
The objective will be to have standard Json Responses to our AJAX calls that we can easily re-use accross our application, independent of what action or what objects we are working with… And by having and standard responses, we can have a standard way to handle them.
Download the Code
Continue reading “ASP.Net MVC: Using Json Standard Responses for your Ajax Calls”
In this post I will be addressing how to fix an error with AddThis.com’s Facebook Like button, that results int he following error:
Parser Error Message: The string ‘fb:like:layout’ contains too many device filters. There can be only one.
Continue reading “Quick Fix for AddThis.com’s Facebook Like Button in IIS7.0”
In this post I will show you how I implemented a delete confirmation implementation for MVC using the jQuery UI Dialog control. I have done this by adding virtually no customization to the templates generated ASP.Net MVC, and aiming the functionality to be as reusable as possible.
When a user clicks the “Delete” button on a list (or elsewhere), we are going to show a confirmation dialog. If the user confirms, the record will be deleted. If he/she cancels, no action will be taken. In essence, this is what we are trying to do:
On April 20, I attended the Microsoft Event “Visual Studio 2010 – At the movies”. One of the best events I’ve attended lately (content-wise), which speaks very well of the organizing partner Object Sharp. I took a few notes and wanted to share them with all of you. Here it goes:
Continue reading “Notes form Visual Studio 2010 At the Movies event (Part 1)….”
On October 29-07, I attended the real development event in Toronto presented by Jean-Luc David. I found this event interesting because it was really targeted at developers; it was mainly all demos, and the best part is that they showcased some interesting tools to help us develop better sites.
Not all of the tools shown where new to me, but they were used in a way made those tools that I was already using even more useful. Important to notice that the majority of the tools are free.
I plan to present here a summary of all the tools they used, with a bit of description. I believe this will be helpful to the development community that couldn’t attend to the event.
Continue reading “Tools from MS Real Development 07 – Toronto”
As a Web Developer, I’ve frequently have had the need to make asynchronical function calls.
Usually, you need to do async calls when:
In this example, I will be showing some code I use on my Facebook Application (Network Trotters) to update the users profiles.
As a quick contextual background, user profiles are cached on Facebook’s side, and periodically I need to clear the cache so it is updated. This action can take a bit of time when you have a high number of users, but it doesn’t really require any response to the user.
There are 3 main things you need to do to create an async call: