Browse by Tags
All Tags »
jQuery (
RSS)
Avoiding Circular Reference for Entity in JSON Serialization One problem that I was facing yesterday while working on an ASP.NET MVC application was a JSON serialization issue. The problem was a circular reference caused by the DataContractJsonSerializer because of relations between the entity and other entities. In this post I’ll show you how you can use a simple workaround in order to avoid the problem. The JSON Serialization Error Returning the output of the JSON method in an...
Profiling JavaScript 101 Using IE9 Developer Tools Lately I’m involved in a very interesting project which suffer from JavaScript performance issues in old browsers. The main “pain” in the project is the need to support IE8 which is used by many of the client’s users. I’ve got a call to come and help in the process of tuning the application and decided to share some tips of how I profiled the application and found some of the bottlenecks in the application JavaScript execution. Those bottlenecks...
HTML5 Web Notifications Ever wanted to notify your site clients/users while they are surfing in your site? notifications like “Mail message arrived”, “Printer out of paper” are available through smart clients for decades but in web applications they are not so easy to implement. In the past you could have implemented a blinking behavior that will make the icon of the browser blink or you could add a popup which will annoy your users. There are ways to implement this behavior in a browser specific...
HTML5 – Selectors API Level 1 Lately, I’m dealing a lot with HTML5. I co-authored a three days course in that topic for Sela , the company I work for. During the process of creating the course I got to learn a lot about HTML5 and what to expect from the new specifications so expect more posts about this subject in the near future. In this post I’m going to describe what is the JavaScript Selectors API Level 1 and compare it with jQuery. Selectors API The Selectors API enables web developers to select...
My Sela Dev-Days Experience Today I finished my Sela Dev. Days experience. Sela Dev. Days is a conference which include 5 days, 15 top experts, 25 session, and a whole lot of attendees (around 600 people registered for this week). If you are not familiar with Sela Dev. Days you can go to the conference’s site . In the conference I had three tutorial days in three different subjects: ASP.NET MVC 3, EF Code First integration, and Razor: Oh My! In this one day tutorial I co-operated with Sebastian Pederiva...
Combining WCF Data Services, JSONP and jQuery During Mike Flasko’s session at MIX11, he showed how to create a JSONP aware WCF Data Service with a JSONPSupportBehavior attribute that is available for download from MSDN code gallery (and is supposed to be a part of Microsoft.Data.Services.Extensions namespace). In this post I’ll show a simple example that uses the attribute and jQuery in order to make a JSONP cross domain call for a WCF Data Service. Setting up the Environment First I started by creating...
MIX11 Keynote Session Summary I’m currently attending the MIX11 Keynote session. Here are some of the things that you might consider to checkout in the following weeks: IE10 Preview was released and can be download from here . A new tools update for ASP.NET MVC3 was released and includes: EF4.1 support jQuery 1.5 and Modernizr support Scaffolding support New Controller templates More WebMatrix update Orchard CMS new release Windows Azure new upgrades Access Control Service V2 Caching CDN support...
jQuery Alert Dialogs Plug-in When you want to alert the user in the client side of a web application probably you are embarrassed (or you don’t give a damn) when you use Javascript built-in alerts. I know I do. Javascript built-in alerts are very ugly IMHO and therefore I try to use alternatives instead. In this post I’ll show a very useful alternative that I’ve been using lately in more then one project – the jQuery Alert Dialogs plug-in. jQuery Alert Dialogs Plug-in One of the benefits of using...
Quick Tip – Disable/Enable Button by Textbox Client Event using jQuery I find myself often with a need to disable/enable a button according to client events that occur on web pages. Today I helped to implement this behavior again so I thought it will be nice to share the code I used. In this example I’m disabling/enabling a button according to whether a textbox holds some text. I’m using jQuery to make the code simple. Pay attention that this solution can be implemented for other events also. The...
How to Enable Client Side Validation in ASP.NET MVC 2 Last night I was teaching MVC framework as part of an ASP.NET course. One of the things that I showed the students was how to use data annotations for server side validation. I got a question about how to enable client side validation in MVC 2 and decided to write about it in a post. So here it goes… MVC Server Side Validation In MVC 1 we didn’t have client side validation out of the box. In order to achieve validation we needed to use one of...
Calling a WCF Data Service From jQuery I’m working on a lecture about OData which I’ll will present next month (stay tuned for more details in the near future). One of the things that I want to show is how easy and simple it is to consume a WCF Data Service ( OData feed) with the jQuery library. In the post I’ll show you exactly how to do that. jQuery’s getJSON Method When you want to load JSON data from the server using a GET HTTP request in jQuery you will probably use the getJSON method. That...