Want a better IE performance? Kill it’s addons!

The other day I visited a friend of mine that bought a new netbook.

After installing windows XP SP3 and IE8 his browser performance dropped, websites were loaded slowly and it took the IE ages to load.
At first, he thought it was a malware of some kind so he installed an antivirus and scanned the computer but the scan showed nothing.
After a little more research he said to me “I think I know who is the virus – the IE itself…” and guess what, he was right.
IE8 comes with a lot of add-ons that suppose to make your social life easier. I for one would never understand what is the use of those addons and don’t know anyone that use them…
Apparently those add-ons slow down the performance of the browser and as a result, it takes ages to make it launch or load websites.
As I see it if you want a better browsing experience you have two options:
1. Disable those add-ons.
2. Use another browser.
Personally, I’m a big fan of Google Chrome and use it as my default browser but because I’m a web developer who develops using .Net and Visual Studio technologies I can’t just get rid of the IE.
The only choice I had left is to disable those add-ons and that exactly what I did.
Here is how you do it:
1. Go to Tools -> Manage add-ons

2. On the left side of the window that was opened choose “all add-ons”

3. Disable irrelevant add-ons by choosing them and press the disable button at the right bottom side of the window.

Now I don’t need to be afraid that my PC will freeze every time I click on a link in an email message.
Hope this helps you too!

Developing an IPhone app with C#

Yes, it’s possible.

A couple of days ago my friend Erez Eden sent me an email with a link to the Mono project website.
For those of you that aren’t familiar with it, mono is a “cross-platform, open source .NET development framework” sponsored by Novell and the open source community – that means that you can develop applications to OS’s other then Windows using .Net technology.
I’m familiar with this project for some time now but what I didn’t know is that there is an IPhone OS version of the framework! that means that you can develop IPhone app using C# – How cool is that?
The subproject is called MonoTouch and you can find it here.
Currently, it’s not open to the public but hopefully, it will be in this September.
The downside is that because the IPhone OS doesn’t support JIT engines the code you write will be compiled to static native code for the OS.
That generally means no reflection and some more limitations for the development.
As a developer in the mobile industry that is a big fan of the .Net technology and especially C# I was very excited to hear about this framework but after I realised I’ll still have to develop the application on a mac in order to test it I started thinking why to bother and start to develop an application that rely on a third party framework, maybe it’s better to suck it up and learn the Objective-C syntax and that’s it (objective-c is the language that being used do develop applications to the IPhone and Mac) ….
I still don’t know if I’ll go with the mono or objective-c path but I’ll sure give the MonoTouch a try once I’ll get my hands on it!
What do you think?

Getting values of CheckBoxList items from javascript

On my last post I wrote on getting CheckBox values from the client side.

On the same project, I needed the same functionality for the CheckBoxList control.
Because CheckBoxList holds ListItem I couldn’t access the InputAtributes property of the CheckBox.
After some googling I found this post by Evan Freeman that explains how to create a new custom control that renders the server side values into the HTML code.
In this way, you gain server side and client side functionality at the same time.

This is the code for the new ChcekBoxList control:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Globalization;
using System.Security.Permissions;

namespace System.Web.UI.WebControls{
Level = AspNetHostingPermissionLevel.Minimal),
Level = AspNetHostingPermissionLevel.Minimal),
public class CheckBoxListWithClientValues : CheckBoxList
private CheckBox _controlToRepeat;
private bool _cachedIsEnabled;
private bool _cachedRegisterEnabled;

public CheckBoxListWithClientValues()
    this._controlToRepeat = new CheckBox();
    this._controlToRepeat.EnableViewState = false;
    this._controlToRepeat.ID = "0";

protected override void RenderItem(ListItemType itemType,
    int repeatIndex,
    RepeatInfo repeatInfo,
    System.Web.UI.HtmlTextWriter writer)
    if (repeatIndex == 0)
        this._cachedIsEnabled = base.IsEnabled;
        this._cachedRegisterEnabled = ((this.Page != null) && base.IsEnabled);

    ListItem item = this.Items[repeatIndex];

    if (item.Attributes.Count > 0) //has attributes  
        foreach (string str in item.Attributes.Keys)
            this._controlToRepeat.Attributes[str] = item.Attributes[str];
    this._controlToRepeat.ID = repeatIndex.ToString(NumberFormatInfo.InvariantInfo);
    this._controlToRepeat.Text = item.Text;  
    this._controlToRepeat.Checked = item.Selected;
    this._controlToRepeat.EnableViewState = true;
    this._controlToRepeat.Enabled = this._cachedIsEnabled && item.Enabled;
    this._controlToRepeat.InputAttributes.Add("value", item.Value); //add the value attribute to be rendered

And thanks for Evan for posting this code.

Happy coding.

ASP.NET Get a CheckBox value from javascript

Recently I needed to access the value of a CheckBox from javascript.

Because CheckBox doesn’t have a Value property I tried the following:
myCheckBox.Attributed.Add("value", "test");
And tried to access it from javacstipt:

I was surprised to find out that the message in the alert was “on” and not “test” as I expected so I looked at the source of the page and this is what I saw:

As you can see the value I set on the server side code doesn’t appear in the result html code.
After a little more research I found out there is a property for the CheckBox that is called “InputAttributes” – this property adds the attributes to the CheckBox input.
This is the correct code:

myCheckBox.InputAttributes.Add("value", "test");
That’s all I needed.
Happy coding.

ASP.NET calling a web service from javascript

Calling a web service from javascript should be a very easy task.
Especially if you are using prototype or jquery in your project.

The other day I spent to much time trying to call a WebService using Prototype js library so I decided to post the code here in case anyone else encounter the same problem.
Server side code:
            [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
            public class WebService : System.Web.Services.WebService
                public string HelloWorld(string testParam)
                    return testParam;
Prototype syntax:
            new Ajax.Request('WebServices/WebService.asmx/HelloWorld',
                postBody: "{testParam:'hello'}",
                method: 'post',
                contentType: 'application/json; charset=utf-8',
                onSuccess: function(transport) {
                onFailure: function(transport) {
JQuery syntax:
                    type: "POST",
                    url: "WebServices/WebService.asmx/HelloWorld",
                    data: "{testParam:'hello'}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function(result){
That’s it.
Hope it help someone out
Happy coding!

IVV What? oh, IVVR…

So what is IVVR?

IVVR (also known as Video IVR or IV2R) Stands for Interactive Video and Voice Response.
This technology (available only for 3G handsets that can carry a video call) is very similar to the traditional IVR technology (Interactive Voice Response).
On IVR services users call a phone number and interacts with a service using the phone’s dial pad. The service plays the users voice menus/records and the user navigates through the service by pressing the phone’s dial pad.
On an IVVR service instead of just hearing voice menus and records, the user sees a video on his handset screen and interact with the service just like traditional IVR services.
The video can be a graphical menu, a video clip, or even a live video chat with a customer care representative.
IVVR technology enables a new kind of services that until know could only be accomplished by native applications or WAP services, both requires a lot of development and maintenance time while an IVVR service is being developed only once and runs on every 3G handset that can carry a video call.
IVVR v Native app v WAP
From a service provider point of view IVVR technology has some advantages and disadvantages over the native app/wap sites market. I’ll mention some of them.
  1. IVVR has a built in business model that comes from the revenue of the incoming calls for the service.
  2. Marketing a phone number/short code is an easier task than marketing a native app that requires the user to download or a wap site that requires the user to remember a URL.
  3. Users with 3G handsets don’t have to buy a data plan from their carriers so they can use wap sites or native apps that require connectivity to the internet.
  1. Interacting with an IVVR service is easier than interacting with a wap site but not as intuitive as a native app.
  2. IVVR video quality is poor and can be an issue for some services.
  3. Users aren’t familiar with this technology and don’t know how to use video calls.
IVVR in Israel
Israel is a pioneer in the field of IVVR.
All four major news channels in Israel has launched an IVVR portal for their video content.
The last one is the Russian channel – Israel Plus (channel 9) that has recently launched an IVVR portal that was developed by the company I work for as the CTO – Pocket Worlds LTD.
On this portal that can be reached by calling *909 using a video call users can watch a live streaming from the channel, recent news, and programs from the channel etc.
Several more IVVR services have launched in Israel, on some of them hopefully I’ll post on a different occasion.
IVVR is a technology that only starts its route.
From my point of view, it’s a very interesting technology that enables new kind of services.
I think that in the near future we will see more and more services based on this technology.
What do you think?