Wednesday, January 24, 2007

AutoCompleteExtender Problem

IMPORTANT NOTE: This problem was found when I was working with AJAX RC1.

Recently, I tried to add an AutoCompleteExtender for each item in a repeater (which itself is inside an UpdatePanel). In each item, I added also Edit/Update links, textbox and AutoCompleteExtender. Here is the HTML view

However, it seems that TargetControlID property is not affected when the autocomplete set inside the repeater/updatepanel (Actually, don't know which one is the reason). But what I did is to set the TaregtControlID property of the extender in runtime, when the user trying to edit a certain item.

Click To Enlarge

That is all!

kick it on

AJAX Version 1.0 Available Now!

AJAX Version 1.0 is now released for market and available to download.

To download the full version, visit: ASP.NET Offical Site

ASP.NET AJAX is a free framework for quickly creating a new generation of more efficient, more interactive and highly-personalized Web experiences that work across all the most popular browsers.

With ASP.NET AJAX, you can:

Create next-generation interfaces with reusable AJAX components.
Enhance existing Web pages using powerful AJAX controls with support for all modern browsers.

Continue using Visual Studio 2005 to take your ASP.NET 2.0 sites to the next level.
Access remote services and data directly from the browser without writing a ton of complicated script.

Enjoy the benefits of a free framework with 24x7 technical support provided by Microsoft.

Paging Implementation With SQL

When you see how the paging is a piece-of-cake now in .NET server controls (like GridView), you should imagine how much amount of work is needed to do paging in early days. On of the suggestions was to fetch all the data block and store them on a session variable or any such temporary allocation and just do your paging in you business layer! Ok..I hear someone say what a silly solution! That is true. This is really a mess when you working on huge data blocks. So, the best way is to do you paging in your data layer.

You may ask? why I should consider paging while I have ready-to-use paging server controls? .. Well, Although, .NET provide ready-to-use controls with paging feature (like GridView), you still need to implement paging inline for other controls such as Repeaters and Datalists.

Recently, I was searching for doing paging using a single SQL statement. Unfortunatily, solutions differ from DBMS to another. For example, in MySQL, you can make the paging using a SQL statement like that:

SELECT fields FROM table LIMIT $offset,$pgsize

In the other side, SQL Server doesn't have such keywords for paging. But still there is a solution. You can go around and use "TOP" keyword to do the paging using SQL. For example, if your page size is PAGESIZE, you can divide you data to several pages as following:


PAGSIZE is constant,and you just change the OFFSET. For example, if your PAGESIZE is 20, then your offset should be: 0, 20, 40 and so on. I think this SQL statement is a piece of art! I really like it!

kick it on

Saturday, January 13, 2007

MDC2007 Registeration Starting Up

MDC2007 started up its registeration process for attending the event. MDC 2007 is the biggest Developers' Conference of the year in the Middle East, and is a critical event for any developer who wants to see the newest as well as the next-generation technology. MDC07 is full of sessions and activities that help you learn the current and future of the Microsoft platform and get to know people who are as passionate about software as you are.

MDC2007 will be held in Cairo International Conference Center, between February 4-7. The registeration fees is 100 Egyptian Bound, which you will have to pay in the first of February, 2007 in Cairo International Center.

For Registeration, Visit MDC2007 Official Site

iPhone - New Apple Device

iPhone combines three products — a revolutionary mobile phone, a widescreen iPod with touch controls, and a breakthrough Internet communications device with desktop-class email, web browsing, maps, and searching — into one small and lightweight handheld device. iPhone also introduces an entirely new user interface based on a large multi-touch display and pioneering new software, letting you control everything with just your fingers. So it ushers in an era of software power and sophistication never before seen in a mobile device, completely redefining what you can do on a mobile phone.

The phone will be available in two models, 4GB and 8GB priced at $499 and $599 respectively, and will ship to the US in June of this year. Europe will get the phone in the fourth quarter, while Asia will wait till 2008.

It's nice to mention that Microsoft has recently released Zune. In my opinion, iPhone has crashed any expectations and provide ultimate features which can't be compared with Zune such as internet access and mobile phone cababilities.

On the other hand, Cisco sues Apple over use of iPhone trademark. Cisco said in the complaint that Apple had attempted to get rights to the iPhone name several times, but after Cisco refused, the company created a front company to try to acquire the rights another way, according to the lawsuit. For more about this issue, click here.

Finally, it's the industry challenge and days will be tell us who wins.

Monday, January 01, 2007

Zune: The Microsoft iPod

It seems that Microsoft want to straggle in all the fields even in the Media and Music World. Now, we have a new competitor for iPod - The Apple Product - which is introduced as Zune. Zune is a new handled device for music and media gives you almost the same features of iPod and maybe better. Explore more about it here: Zune - Official Site

Depending on this post, Zune has some key features which may lead to a great success over iPod. For example, Zune gives you the WiFi conectivity feature which is an attractive way in sharing songs and videos. However, you can't connect to the internet through it (see this). Also, the wide screen is something attractive for Zune fans.

The challenge which Zune may face is in the Zune battery life which may not be able to last for a long time with the Wi-Fi connectivity and the device large screen. It's nice to mention here that, iPod battery can currently last for approximatly 12-hours.