SIMILE

SIMILI is a project of MIT where they have been developing various API’s.
Exhibit is one of the API which we use to display complex data and is maintained by Google labs now. Exhibit is a three-tier web application framework written in Javascript, Few hundred records of data we have is shown by just creating a data file and a simple html file which describes how the data should be displayed..Data file is in JSON format and we have converted all the data in access database to JSON format by making some modifications with the existing database.

Basic idea of Exhibit can be found here

They provide a tool to convert the data from excel to JSON and it can be done by using babel

If you have a huge data and not sure how to organize them, Exhibit would do wonders with those data.

Using Ajax Auto-complete extender control

Now its easy to use auto-complete or auto-suggest text box in your asp.net project or website. It’s quite simple. Follow the steps carefully.

Step 1: Open visual studio

Step 2: Select a ajax enabled webapplication or ajax enabled website

Step 3: In the design view of default.aspx page, make sure script manager is in the page and if not add a script manager from the ajax tool controls

Step 4: Drag and drop the textbox and autocomplete extender control and rename textbox as mytextbox.

Step 5: Copy the access database you want to use to app_data folder of the website

Step 6: Right click on the app_data folder and then add existing item and add the mdb file and you can see the database appear in the application folder.Right click on the project->Add new item ->add a webservice and rename it as autocomplete.asmx.
( In case this is the first time you are creating a webservice you may get a prompt asking if you need to put the code in a separate class file. Select Yes )

Step 7: Now paste the code in autocomplete.cs file under the app_code folder. Change the query string and other credentials as applicable to your project

using System;
using System.Collections.Generic;
using System.Web.Services;
using System.Data;
using System.Data.OleDb;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class AutoComplete : WebService
{
[WebMethod]
public string[] GetCompletionList(string prefixText,int count, string contextKey)
{
count = 10;
string querystring;
OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Documents and Settings/user/My Documents/Visual Studio 2008/Projects/WebApplication1/WebApplication1/App_Data/data.mdb");
querystring = "select distinct student_name from student_query where course_name like @prefixText";
OleDbDataAdapter da = new OleDbDataAdapter(querystring, aConnection);
da.SelectCommand.Parameters.Add("@prefixtext", OleDbType.VarChar, 50).Value = prefixText + "%";
DataTable dt = new DataTable();
da.Fill(dt);
string[] items = new string[dt.Rows.Count];
int i = 0;
foreach (DataRow dr in dt.Rows)
{
items.SetValue(dr[0].ToString(), i);
i++;
}
return items;
}
}

Step 8: In the default.aspx page make the following changes
For the autocomplete extender include the following properties

TargetControlID="myTextBox" ServicePath="AutoComplete.asmx" ServiceMethod="getCompletionlist" MinimumPrefixLength="1" UseContextKey="true" ContextKey="course">

Step 9 : Now if you run the project you should be able to see the suggestions for a particular letter depending on the words in your database.

Tips: If you have done all the above steps are still you are not able to find what is wrong with your project , there should be something wrong with your config file.
You don’t have to give up. Follow these steps now,
Go to this page
Watch the video if you are new and then download the c# code from there. Make necessary modification according to your project as you already have the webservice code to connect to access database. With little modification of the query strings you can use SQL datasource too.

Comments are welcome. Please let me know if this works for you.

Add Ajax to your ASP.Net Project

There are lots of ajax libraries which can be used to implement ajax in any website or any web project. Anthem.net is a famous opensource Ajax library which can be used to implement ajax functionalities to an ajax enabled website.

Visual Studio 2008 provides in build libraries for Ajax support.  Ajax control toolkit has to be downloaded and installed in the case of VS2005 and VS2008 bypass this step.

Various sample functions of Ajax can be found here to take a look before starting with the actual coding.

Download Ajax control toolkit. (AjaxControlToolkit-NoSource.zip would be fine if you are just going to use and Ajax controls)

Once it has been installed properly you would be able to see ASP.Net Ajax-Enabled Web Application in the New project menu.


Download ASP.Net Ajax Extensions for using the Ajax controls to your project.

Ajax Extensions can be installed with the help of this video and after installing you should be able to see the tools in your IDE.

Let me explain the steps to connect an Ajax Autocomplete extender control with an access database in the later post. This can be done by writing a webservice to connect to the database.

WebTop – A useful Tool for Internet users

I have always imagined how it would be taking my own desktop computer wherever I go in the world, whosoever computer I use, with the features of sharing files, pictures, videos and data with my buddies without sending them an E-mail or a link to view my pictures and videos.

Sounds Weired right ?

Yah, it is possible now with Jooce. Its a flash based webOS/Webtop.

Jooce says that it targets people who are using different computers from time to time providing them features like

  • Sharing files, photos, videos and documents.
  • Playing videos right there.
  • Chat with friends with Yahoo, Aim, MSN and icq

Sounds interesting right?

There are couple of similar services provided by Startforce which aims at different customer market towards enterprises with data security and remote connectivity.

G.ho.st is one more free webbased virtual computer which you can take a look at.

Get your custom Flash Menu

It’s quite simple to create a flash menu even if you don’t know xml and actionscript. There are lots of tutorials available in internet.

Ok ! you need it still simple to get it done?

Download sample flash menu from here. Make changes in the xml file to get you own flash menu for you website.

Choose just your colors and labels . You are all set.

Firefox Add-Ons for Web Developers

Working with web became quite simple with some of the add-ons which can be used in Firefox. I personally prefer to use firefox than other web browsers.

These are some of the Firefox Add-Ons which I found to be very interesting and believe me it saves time.

CSS Menu

Are you too not an expert in CSS and still want to create a good looking menu for you webpage?

There are lots of CSS codes available. I tried couple of CSS menu generators to create a menu for a website I was working with, but was not impressed with sample codes. At last I was lucky to get a CSS Menu generator which helped me to create horizontal, vertical, combo-box and pull-down menu’s.

Mash-up

Now its time to mash-up.

Yah , Yahoo pipes is quite interesting to people who like to play with mash-up contents from the web.

I was really amazed to look at the power of this tool. Yahoo provides a cool interface where you can create your own pipe ( that what yahoo name it) that would be able to create your own feed from the combination of feeds you are interested in.

In case if you frequently visit couple of news feeds, you can create your own pipe which combines the updates of all the feeds and then even you would be able to provide functionality to list only the news you need ( Lets say you like to see only cricket news, you will be able to get only the updates about cricket from all the feeds by filter options. Or if you are looking for a best deal of a particular product, create a feed and keep track of it)

There are lot more you can play with pipes.

RSS Feeds

Have you even wondered how to organize your feeds. Or do you need to create a RSS feed for a webpage of your particular interest. Feedity would be useful to create rss feed even if the website doesn’t provide feeds.

Now its quite simple to create your own feeds.

Laptop doesn’t boot?

Everyone knows that its very important to take backup of valuable data, coz we never know when our computer in going to hate us. 

May be one day we switch ON our laptop and see that it doesn’t boot [ Oh my God ! you should have not did this to me atleast today. Today is the last day to submit my semester project ]  

Ya, may happen to any one of us only at wrong times. Ok. Don’t Panic.

Just try to do the below steps. I tried to do this when one of my friend’s Windows crashed just on the final day of submissions. And I was able to get his files from it safely transferred to a USB device.

I came across KNOPPIX from one of the site where there were detailed step by step instructions :  KNOPPIX is a bootable Live system on CD or DVD.

Step 1 : Download Knoppix from any of the mirrors

Step 2: Write it in a CD/DVD

Step 3: Make sure CD drive is selected as first boot device. This can be done by entering into setup by pressing F1,F8 or some function button

Step 4: Sit back and relax untill the CD loads LINUX on your system.

Step 5: Hurray ! I got my files back.

 Picture source : Knopper

Next Page »