Thursday, March 8, 2012

jQuery HTML5 Signature Pad

Recently I come across situation where I need to provide browser based Signature Pad and It should work fine in all the devices including apple devices. So I don't have any other option left then HTML5 Canvas.

If you want to create a browser based signature pad then visit the link below. http://thomasjbradley.ca/lab/signature-pad/ To save signed signature visit the link below. (CODE IS IN C#)  

Dealing with DateTime in C#

Recently I come across very ugly error which makes my application crashed. Actually it was problem converting DateTime for specific format. You should make your DateTime conversion independent of client computer’s culture setting.  This thought in mind I am going to present this post.

1.       Convert String  to DateTime

Let’s take an example:

Suppose you have
 String strDate = "10/23/2011"; 

Which is in MM/dd/yyyy format and you want to convert it in DateTime variable then you should write like
 DateTime dt = Convert.ToDateTime(strDate,System.Globalization.CultureInfo.InvariantCulture); 

You could write above code if you are sure that the format is in MM/dd/yyyy. If the format is in say dd/MM/yyyy then DatTime.ParseExact is the perfect option for you.

Code above can be rewritten as
 DateTime dt = DateTime.ParseExact(strDate, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); 
In all above code lines I have mentioned System.Globalization.CultureInfo.InvariantCulture parameter, which will make date format, culture independent.

2.       Convert Datetime to Specific Format

Let’s say you have
 DateTime dt = DateTime.Now; 
and you want to convert it in different format. 

Example : Format : dd-mmm-yyyy
 String s = dt.ToString("dd/MMM/yyyy"); 

But this will be overridden by current culture.

So you should do something like this
String s = dt.ToString("dd/MMM/yyyy", System.Globalization.CultureInfo.InvariantCulture); 

In short, CultureInfo parameter plays an important role.

Run Executable (exe/bat) file from Web Page

To run an exe from your web page is quite easy process. I have used simple JavaScript to accomplish this task. Have a look at the code listed below.

function WriteToFile() {

var fso, s,folderName;

fso = new ActiveXObject("Scripting.FileSystemObject");

if (!fso.FolderExists("C:\\HITESH"))

{

folderName=fso.CreateFolder("C:\\ HITESH ");

}

if (!fso.FileExists("C:\\ HITESH \\LaunchApp.bat")){

s = fso.OpenTextFile("C:\\ HITESH \\LaunchApp.bat" , 8, 1, -2);

s.writeline("IF EXIST d:\\hitesh GOTO LABEL1”);

s.writeline("IF EXIST k:\\hitesh GOTO LABEL2”);

s.writeline(":LABEL1”);

s.writeline("D: ”);

s.writeline("D:\\hitesh\\AppTest.EXE”);

s.writeline("EXIT”);

s.writeline(":LABEL2”);

s.writeline("K: ”);

s.writeline("K:\\hitesh\\AppTest.EXE”);

s.writeline("EXIT”);

s.Close();

}

}

function LaunchApp() {

WriteToFile();

var oShell = new ActiveXObject("WScript.Shell");

var prog = "C:\\ HITESH \\LaunchApp.bat";

oShell.run ('"'+prog+'"',1);

}
This javascript will create an object of WScript.Shell and will execute DOS based batch file. In addition with this I have also created LaunchApp.bat file programmatically if it does not exist on the client side (So you don’t need to worry about whether file exist or not J). This file will execute EXE depending upon conditions specified in the LaunchApp.bat. LaunchApp() is the starting point.

Encode Text Message to PDU

Text Message must be encoded properly into PDU before submitting it to network. [Note: this is applicable if you are going to send SMS in PDU mode]. In this post I am going to explain how you can do this, but before that please download sample code from Planet Source code. This code contains Convert, Sending and Receiving modules. Frankly speaking I have got encoding/decoding logic from this code and it works perfectly for me. Only thing missing in this code is Padding Bit logic. Code is quite simpler and easily understandable. Please go through it and tell me if you have problem encoding text message into PDU.

How to add Padding bit for multipart SMS PDU?

Open the code > go to Convert Module > Find “CharHex”  Method.
Do replace this function with the code shown below.

Public Function CharHex(ByVal Txt As String, ByVal bit As Integer, ByVal PaddingBit As Boolean)
Dim i As Integer, bin As String, nbin As String, n As String
Dim bil As Integer, sisa As Integer, lbin As Integer, nol As String
bin = ""
nbin = ""
If bit = 7 Then
For i = 1 To Len(Txt) Step 2
n = Mid(Txt, i, 2)
bin = HexToBin(n) & bin
Next
bil = Len(bin) \ bit
sisa = Len(bin) Mod bit
For i = 1 To (Len(bin) - sisa) Step bit
' MsgBox Chr$(HexToDec(BinToHex(Mid(bin, i + Sisa, bit))))
nbin = Chr$(HexToDec(BinToHex(Mid(bin, i + sisa, bit)))) & nbin
Next
Else
For i = 1 To Len(Txt)
n = Mid(Txt, i, 1)
bin = Biner(Asc(n)) & bin
Next
If PaddingBit = True Then
bin = bin + "0"
End If
sisa = Len(bin) Mod bit
If sisa > 0 Then
For i = 1 To bit - sisa
nol = nol & "0"
Next
End If
bin = nol & bin
bil = Len(bin) \ bit
For i = 1 To bil
nbin = nbin & BinToHex(Mid(bin, Len(bin) + 1 - bit * i, bit))
Next
End If
CharHex = nbin
End Function


That's it !!

 Do let me know if you have any problem encoding text to PDU.

Sunday, April 4, 2010

Send Long SMS/Multipart SMS/Concatenated SMS

Here I am writing about most awaited post of my blog with great excitement. In this post I will explain you , how to send long SMS or multipart SMS or concatenated SMS. Before I explain you I want to share my experience during searching for the secret of long SMS. When I started searching on internet about “how to send concatenated sms”, I found resource on wiki which explains the basic of long SMS and PDU format for sending long SMS. But this page (wiki) contains link at bottom of the page and this link (trust me) one of the best resource on the internet to learn about concatenated SMS. Here is the link if you want to read this blog : http://mobiletidings.com/2009/02/18/combining-sms-messages/. But still I am having same problem not able to send long SMS using AT command. But reading this blog I am sure that I am missing something in my PDU which cause problem. What I have done is I have contacted Franco (owner of http://www.franco7777.net/), who is one of the commenter on “http://mobiletidings.com/2009/02/18/combining-sms-messages/” blog. He gave me very nice response and explain me where my mistake is. And after that I have got the clear idea about sending long SMS over network.


Now I want to show you how you can send long SMS. But before reading this post further I will strongly recommend you to read http://www.dreamfabric.com/sms/ and grab basic idea about SMS PDU structure. When you send single SMS ( <= 160 Character) there is not UDH exist in the message but when you try to send long SMS ( > 160 Character) you need to add this UDH field into the message PDU. So the basic question is how to add this header in to the message. One more thing you should know to send concatenated SMS, and the thing is when you send single SMS there is no User Data Header so little less confusion and you don’t need to add padding bit to encode your message into GSM 7-bit encoding scheme but if you are going to send concatenated SMS, UDHL is exist and it is in septets so you need to add one padding bit compulsory to encode your SMS. Read http://mobiletidings.com/2009/02/18/combining-sms-messages/ blog to get the clear idea because I don’t want to post same content again in this post.


So basically there are 2 secret to send long SMS

  1. Add User Data Header

  2. Add Padding bit to encode your message.


If I want to send

Message:

  • Message 1: “This is Part 1.”

  • Message 2: “This is Part 2. “


Message PDU should be

[caption id="attachment_166" align="alignnone" width="544" caption="Message 1 - PDU"]Message 1 - PDU[/caption]

[caption id="attachment_165" align="alignnone" width="544" caption="Message 2 - PDU"]Message 2 - PDU[/caption]

That’s it , you are done !!

Things to know before sending Long SMS is , UDH will occupy 6 octets so original message size should be reduce.

Please let me know if I am missing something so I can update this post.


Send Long SMS/Multipart SMS/Concatenated SMS

Send Long SMS/Multipart SMS/Concatenated SMS

Here I am writing about most awaited post of my blog with great excitement. In this post I will explain you , how to send long SMS or multipart SMS or concatenated SMS. Before I explain you I want to share my experience during searching for the secret of long SMS. When I started searching on internet about “how to send long sms”, I found resource on wiki which explains the basic of long SMS and PDU format for sending long SMS. But this page (wiki) contains link at bottom of the page and this link (trust me) one of the best resource on the internet to learn about concatenated SMS. Here is the link if you want to read this blog : “http://mobiletidings.com/2009/02/18/combining-sms-messages/”. But still I am having same problem not able to send long SMS using AT command. But reading this blog I am sure that I am missing something in my PDU which cause problem. What I have done is I have contacted Franco (owner of “http://www.franco7777.net/”), who is one of the commenter on “http://mobiletidings.com/2009/02/18/combining-sms-messages/” blog. He gave me very nice response and explains me where my mistake is. And after that I have got the clear idea about sending long SMS over network.

Now I want to show you how you can send long SMS. But before reading this post further I will strongly recommend you to read “http://www.dreamfabric.com/sms/” and grab basic idea about SMS PDU structure. When you send single SMS ( <= 160 Character) there is not UDH exist in the message but when you try to send long SMS ( > 160 Character) you need to add this UDH field into the message PDU. So the basic question is how to add this header in to the message. One more thing you should know to send concatenated SMS, and the thing is when you send single SMS there is no User Data Header so little less confusion and you don’t need to add padding bit to encode your message into GSM 7-bit encoding scheme but if you are going to send concatenated SMS, UDHL is exist and it is in septets so you need to add one padding bit compulsory to encode your SMS. Read “http://mobiletidings.com/2009/02/18/combining-sms-messages/” blog to get the clear idea because I don’t want to post same content again in this post.

So basically there are 2 secret to send long SMS

  1. Add User Data Header

  2. Add Padding bit to encode your message.


If I want to send

Message:

Message 1: “This is Part 1.”

Message 2: “This is Part 2. “

Message PDU should be

******Image*******

That’s it , you are done !!

Things to know before sending Long SMS is , UDH will occupy 6 octets so original message size should be reduce.

Please let me know if I am missing something so I can update this post.

Sunday, December 20, 2009

Avoid Using Updatepanel

Updatepanel is part of AJAX Extension 1.0 and later provided by Microsoft. Update panel is used to hide page refresh using some standard mechanism. But What about speed? In my experience updatepanel is the best solution if your page does not contain large number of components. And make sure controls you used is supported by updatepanel. Because controls like GridView,Treeview and more , are not supported by updatepanel. So you can expect behaviours change if you put it inside updatepanel.


I have recently trusted on updatepanel and used in my page where speed is the primary concern and that page was almost dead. So avoid using updatepanel where speed is primary requirement.


I have used Prototype AJAX in my application. It’s faster and better. Give it a try. I tried to use jQuery AJAX but it has not that much support for ASP.net 2.0, its very good if you working on ASP.net 3.0 or ASP.net 3.5 version of .net.


So the conclusion is , avoid using updatepanel to get better speed , insted you can use Prototype or jQuery AJAX to get the best speed and performance of your application. Googling around the web and you will get many working example of protory and jquery.

Saturday, September 19, 2009

MySQL With .Net 2.0/3.0/3.5

MySQL is open source database. We had always seen MySQL with PHP. Generally we know MySQL is database engine for PHP. It’s true because .net does not have inbuilt support for MySQL database. We need to install other tools to make it work perfectly. In order to work with MySQL in .net you need to install MySQL Server and MySQL Connector. You can create function and procedure in MySQL version 5.1 and later. At the same time you will get great user interface to manage database. You will get interface just like MS SQL server management studio. MySQL Connector is used to add database connectivity support in Visual Studio. Download Connector depending upon the .net framework you use and Visual studio you work on. Version 5.1 GA (Generally Available) and later is recommended for .net framework 2.0 and higher.



Problems I faced:

  1. Syntax of MySQL is very different from MS SQL server.

  2. Error console of MySQL is not that user friendly.

  3. Migration of MS SQL Database to MySQL is quite difficult.

  4. Because it’s not Microsoft product you won’t find any inbuilt programming level support. Ex. It’s really hard to work use LINQ if your backend is MySQL.


Download Latest MySQL Database Server and Connector (Click Here).

Sunday, August 23, 2009

Enable Disable Controls During AJAX Postback

Most of us use Microsoft AJAX Toolkit and Controls but we don’t know when Ajax Request starts and when it ends. Sometimes we need to do enabling and disabling controls during postback. This can be done using the code below.


var _employee=null;
var _department=null;
var _subdepartment=null;

function pageLoad(sender, args){
// Register start request and end request event handler Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequest); }

// fired when ajax request starts
function beginRequest(sender, args){
_ employee = $get('ctl00_ContentPlaceHolder1_ddlemployee);
_ department = $get('ctl00_ContentPlaceHolder1_ddldepartment);
_ subdepartment = $get('ctl00_ContentPlaceHolder1_ddlsubdepartment);
_ employee.disabled=true;
_ department.disabled=true;
_ subdepartment.disabled=true; }

// fired when ajax request ends
function endRequest(sender, args) {
_ employee.disabled=false;
_ department.disabled=false;
_ subdepartment.disabled=false;
}


Here I have added two event handlers to request manager class instance. Event will be fired when request starts or ends. Isn’t it easy? :)

Ref : http://mattberseth.com/blog/

Monday, August 10, 2009

Online Money Transfer

This post is completely non-technical but useful in many places. I want to share my experience with different companies for online money transfer. Few days back, I planned to buy some product over internet but the only problem I faced was How to transfer money in foreign country? I look up many websites which provide this facility but amongst all I would recommend every to go with Xoom and MoneyBooker. I transferred money to china using Xoom. Nowadays, there are lots of options available for online money transfer. Options like Western Union, T/T are good but they charge more or need to study.

I found very nice alternate for online money transfer. Xoom.com. If you search “Online Money Transfer” in Google.com. You may find this website ranked first. Believe me Service is excellent. First time I had tried this website to credit money from PayPal to Indian Bank Account. Money was transferred in few days and I got letter from xoom.com about this transaction. Sound good!


I recently sent money to “Bank Of China”. This means that you can credit requested amount directly to the bank account. One of the nicest things about Xoom is that their executives call to recipient and confirm the details before they proceed.


Another website namely “Moneybooker” provides online money transfer. The feature I like in this website is escrow money. This is the best thing if you purchase product online.



Wednesday, July 15, 2009

Read SMS Using AT Command

Before I start explaining, you must be sure that your handset supports SMS read functionality using an AT command.

How can I test whether my handset supports or not?

Answer is pretty simple, try executing AT+CMGR=? AT Command. If it returns ”\r\nOK\r\n” then congratulation your handset modem supports Read SMS functionality.

Reading an SMS from memory location is always a big headache J. I waste lot of time just to read an SMS using AT command.

If you know SMS memory location then task will be simpler.

  1. First of all set memory type. Use AT+CPMS=”ME” command to set memory from which you are going to read SMS.

  2. After that execute AT+CMGR=”messageID” to read message.


Tip : Whenever you execute AT command never forget quotation mark (“), Carriage Return etc.

You will get message text directly if you are working under TEXT mode. In case of PDU mode you need to convert PDU into Original Message Text by writing some algorithms.

If you want indication for incoming SMS in your application then you need to enable this functionality.

Try “AT+CNMI=?” Command to test whether new message indication functionality is available in your handset or not.

If result does not contain any error and will return some parameters then congratulation again J

Now, use "AT+CNMI=2,1,0,1" AT command to enable new message indication to TE (terminal equipment).

Last but not the least, don’t forget to use "AT+CSMS=0" AT command set ISO 8859-1 character set.

Saturday, July 4, 2009

Send SMS using AT Commands

If you are writing an application which sends SMS using AT commands then, you must read this post. Few days ago I started to develop an application which is completely AT command based. Here I am going to explain the things that I learnt from experience.

First and the foremost thing before you start developing an application based on AT command , know which mode (text/pdu) your mobile handset supports.

If handset supports TEXT mode then work is simple.

  1. First you need to set text mode by using AT+CMFG=1 Command.

  2. And then use AT+CMGS=”+CellPhoneNumber” <enter>.

  3. If command execute successfully then It will return “>” as a response.

  4. After getting success response simply write your message ex. “this is test SMS”. This will submit SMS to network and will return the Message ID.

  5. If you want to send long message i.e. greater than 160 character length message then, this is really very useful.


I will cover how to send long message in my succeeding posts.

If handset supports PDU mode then work will be little lengthy and need some more efforts.

  1. For PDU mode, you need to set pdu mode by using AT+CMFG=0 Command.

  2. And then write AT+CMGS=<length><CR> command for modem to response. Here you can’t send the length of actual message. You need to convert the text into 7-bit or 8-bit encoding scheme. I included some useful links and sample application at the bottom of the page to accomplish this task.

  3. If command execute successfully then It will return “>” as a response.

  4. After getting success response, send <PDU><ctr-z/esc > sequence. This will submit SMS to network and will return the Message ID.

  5. If you want to send long message i.e. greater than 160 character length message then, this is really very useful.


Reference :

  1. PDU message format : http://www.dreamfabric.com/sms/

  2. Complete information about all AT Commands : http://www.developershome.com/sms/operatingMode.asp

  3. Text to PDU converter : http://nerdlabs.org/tools/pdu.php


Sample Application :

  1. PDU Decoder : http://www.codeproject.com/KB/IP/PDUDecoder.aspx

  2. Sample Applications : http://www.scampers.org/steve/sms/samples.htm


Do share new things with me.

Friday, July 3, 2009

Google Search Engine Optimization Guidelines and Best Practices

If you want better rank in Google Search Engine then, why not to follow guidelines given by Google itself. Read the article below to know what Google officials have to say for Search engine optimization.

I have taken much of the information from the Google SEO guideline document.

1. Title Tag


Do

  • Title should be unique and accurately described the page content.

  • Write unique page title for each page of your website. So that Google know how each page is different from other.

  • Title can be short or long. If your title is large then Google will show only portion of it.


Avoid

  • Writing Title which has no relation to the page content.

  • Using Blank or unnamed title like “New Page 1” or “Untitled”

  • Using Single title for all the pages or group of pages.

  • Using unneeded keywords in title.


2. Description Meta Tag

Do

  • Write description that would be both informative and interesting.

  • Unique description for each page.


Avoid

  • Writing Title which has no relation to the page content.

  • Writing Generic description like “page about...” or “this is the page that...” or something like that.

  • Filling it with only keywords.

  • Writing single description for each page.




3. Improve URLs Structure

Do

  • Use words in the URL link that are relevant to your website content.

  • Proper directory structure should be there.

  • Unique URL to reach any document.


Avoid

  • Using page name like “WebPage1.html”

  • Using long URLs or session ids or querystring variables.

  • Using directory names like “Dir1” or “Folder1” etc.

  • Using directory name that does not relate to page content.

  • Mixing www. And without www. URLS



  1. 4. Website Navigation Should be Simple


Do

  • Good linking structure from top to bottom with proper manner.

  • Use text links to navigate from one page to other. So that crawler can easily understand your website.

  • Use “breadcrumb” navigation (ex. Yoursitename >> items >> productname). Using breadcrumb navigation not only gives idea about where you are in the website, but also allow user to go to previous section very easily.

  • Use HTML site map page with XML site map file. This is huge benefit for SEO purpose.

  • Have meaningful and useful 404 page. Visit Google’s widget for 404 Page.


Avoid

  • Creating complex navigation links web.

  • Using image, javascript, dropdowns or flash object for website navigation.

  • Linking broken or dead links in Site map.

  • Using unorganized sitemap page.

  • Using vague message like “page not found”.


5. Quality of Content

Do

  • Write easy and meaningful content.

  • Organize the different topics in the content.

  • Include keywords that user always search. See the search volume of keywords that you have included in your content.

  • Write Fresh and Unique content.

  • Offer exclusive content or services.

  • Create content for users not for search engine. J John chow is also telling the same thing please read more about John chow


Avoid

  • Spelling and Grammatical mistakes.

  • Coping existing content.

  • Avoid unnecessary keywords.


6. Anchor tag text

Do

Avoid

  • Writing the generic content like “Click Here”.

  • Unrelated anchor text.

  • Lengthy anchor text like sentences or paragraph.

  • Using CSS that makes text and link identical in look.

  • Using excessive keywords.


7. Heading Tag

Do

  • Distinguish the main points and sub points and use heading tag appropriately.

  • Not use too many heading tags on the page. This will confuse user about the end of the content.

  • Create proper page structure using heading tag.


Avoid

  • Writing unrelated content in heading tag.

  • Avoid using heading tag where <em> or <strong> tag is appropriate.

  • Putting whole page content into heading tag.

  • Using tag if you only want to give style.




8. Image Tag

Do

  • Give reasonably good file and brief description about what the images is all about.

  • Write very good description when you use image as a link. (Must).

  • Store all the website images under one common directory.

  • Use JPEG,GIF, PNG and BMP images because this are the common file types that all browser can easily understand.


Avoid

  • Giving random file name like image1.jpeg or pic1.gif etc.

  • Extremely lengthy file name

  • Writing keywords and long sentences in alt tag.




9. Use robots.txt Effectively

Basic Idea : robots.txt is the file which tells google.com about the pages that user do not wish to crawl. This file stay under the root directory. Google web master tool help you to create this file.

Do

  • Use secure method for some sensible content.

  • .htaccess, encryption, password protection are the better alternatives.


Avoid

  • Allowing search result kind of pages to be crawled.


10. rel=”nofollow” attribute of Link (anchor tag)

Do

  • Use nofollow set to the link for which you don’t want to pass your reputation to other.


Ex. If you want to inform others about the spam link then you can use nofollow for such link to avoid passing your reputation on to it.

Use nofollow set to the link for which you don’t want to pass your reputation to

  • Write <meta name=”robots” content=”nofollow”> if you're interested in nofollowing all of the links on a page.


This are the guidelines and best practices given by the Google Web Master team. Hope you enjoy reading this article.

Wednesday, June 24, 2009

How to Improve slow running query performance using an Index ?

I recently come across the situation where my query was running very slow. I written a perfect query with good inner join and with proper condition. Have a look at query and its executing plan.

Query Execution Plan Before indexing

As you can see in the image query takes 1.28 minute to execute successfully. And as you can see in the figure , cause for the problem is Clustered Index Scan on LotDetails Table.

See the image below to get the clear idea about Clustered Index Scan Cost in this query.

Query Execution plan Analysis

What I did was Created Non-clustered index on “SlipID” and added “Active” column into Included Columns.

Create Index On Table

Include columns in index


After doing this when I run my query it took 0 second to execute successfully. And Clustered index scan is now turned into Index seek which is 3% of the total execution cost.

Query Execution Plan After indexing

So use index as and when required to boost the performance of your T-SQL Query.

Please correct me if I am wrong anywhere. :)

Saturday, June 6, 2009

Six Useful tips To Earn Money With Google Adsense

I recently went through different articles written under AdSense Help Section. All articles are worth reading if you are interested in earning good income with Google AdSense. I found some interesting tips in this section

  1. Ad Type : 336x280 Large Rectangle, 300x250 Medium Rectangle and the 160x600 Wide Skyscraper this are the good performer.

  2. Text + Image : Always prefer or give a try to Text and image ad combination.

  3. Positioning Ads : Ad just above the website content or just below the end of the content tends to perform well. Also, ads placed in between the content are also a good performer. If are you running a blog then the case may be different. In case of blog the add unit on the right hand side and add unit just below each post is very good money making machine.
    Reference : https://www.google.com/adsense/support/bin/answer.py?answer=43869 https://www.google.com/adsense/support/bin/answer.py?answer=17954

  4. Wider ad formats tend to be more reader-friendly.

  5. Try putting as many ads you can in page. Right now you can place only 3 ads per page.

  6. Colour : Change link colour, ad content colour and title colour depending upon your webpage colour scheme. The impact of using this technique is user would have difficult to understand that whether it’s google ad your website link.


Reference : https://www.google.com/adsense/support/bin/answer.py?answer=17957

Click on the link below to find out all the useful tips given by the google for adsense.

https://www.google.com/adsense/support/bin/static.py?page=tips.html

Note : I have just try to summarise whatever is written in Google Adsense help section. All credit for this goes to Google Adsense Team.

Friday, June 5, 2009

Right Keyword Selection for SEO

In this post I am going to tell you how good keyword selection can affect your site in general.

You open a search engine website , typed some search word(s) and press search button and in return search engine will give you number of results that matches your criteria. So here is my point ? How search engine will return those thousands or millions or billions results? Well, the answer is simple by looking at each page and search for the term you entered.



So when you are selecting keyword for search engine optimization you should think from the client perspective.

Let me explain by example , suppose you have written “Software Consultant India” , What will search engine do when you hit search button,

It will return

  • all the pages containing the exact phrase “Software Consultant India”

  • all the pages containing the words “Software”, “Consultant” and “India” with nearby relation.

  • all the pages containing the word “Software”, “Consultant” and “India” without looking closeness in mind

  • all the pages that have links that contain this “Software Consultant India” phrase

  • all the pages that has the word “Software”

  • all the pages that has the word “Consultant”

  • all the pages that has the word “India”


So choose the right keyword you will surely get better rank in search engine.

One more thing to remember is that don’t ever include irrelative keywords in your page. What will happen in that case, even if people found your web site it will be useless for them because your site contain different information than they are looking for.



Bottom line is that Use right keywords and relative to your domain or business.

At any point if you feel that I am wrong then don't hasitate to post a comment with correction.

Database Publishing Wizard - SQL server 2005

The topic is self explanatory :).

What would you do if you want to generate script that contains data and schema too. To generate script with schema is pretty simple but what about data. Microsoft Database Publishing Wizard is the tool that work with SQL server 2005 to generate that kind of script. Below are the steps to get started.



Step 1
database publishing wizard


Step 2
database publishing wizard


Step 3
database publishing wizard


Step 4
database publishing wizard


Step 5
database publishing wizard


Step 6
database publishing wizard


Step 7
database publishing wizard


Step 8
database publishing wizard

this is the example of database publishing wizard 1.1. I have not used the versions after 1.1 because this version served all my purpose.


Download Microsoft SQL Server Database Publishing Wizard 1.1


if you are sql server 2008 user then you can not use this :) because good news is that sql server 2008 has this wizard by default.


Please follow http://www.kodyaz.com/articles/sql-server-script-data-with-generate-script-wizard.aspx link for sql server 2008 database publishing.


Share your thought with me !! :))

First step towards the SEO

I would not go into detail, I want you to take some action now. Do the things below if it is applicable to your web site.


  • Remove Flash
    Flash is useless if you want better ranking in search engine. it does not cater any purpose.




  • Convert image into text
    If you have image in your page that contain simple plain text then better you should use real text instead of image. More content on your page better your ranking in search engine.




  • Enrich content with good keywords
    If you have enough content for your website then make sure your content is enriched with better keyword. Better keyword matters a lot. To choose best keywords you can use Google Keyword Suggestion tool. Use heading tag, bullet list, bold, Italic effect.

  • If Possible, Navigation Links should have proper keywords in it.

Sunday, May 31, 2009

SEO - Title and Description Tag

Title tag is very important if you want to have good page ranking in major search engine. Title tag now only tells the browser about the page’s title but it’s the SUBJECT line for GOOGLE kind of search engine.

You can find title tag just below the tag.

Example of title tag :

<HEAD>

<TITLE>Your title text here</TITLE>

Make sure each of your web page has title tag and it’s well written. One more thing there should be only one title tag per page. :)

Also DESCRIPTION tag is very important for SEO. Previously GOOGLE was not looking at description tag for keywords and contents , instead it was taking the required information from the page itself. But now GOOGLE is also looking at DESCRIPTION tag.

There are three cases that you should keep in mind while writing META DESCRIPTION tag.

  1. If GOOGLE found all the keywords from the description tag then, GOOGLE displays the whole content in the search.
  2. If GOOGLE found the partial keywords in the description tag then, in that case google takes the search content from the web page.
  3. But it GOOGLE does not found any keywords compare to page then it avoids DESCRIPTION tag as a whole.
Example of META DESCRIPTION tag :
<meta content="write" name="description">


If you want to learn more about HTML then you can visit the W3C School website.

I thing I am clear enough :)

Sunday, May 24, 2009

How do you know that your page is in Google index?

After you add your page into Google search index, It is obvious question arise in mind that does my web page properly indexed in Google or not. If this is the case, then you should try the following search terms in Google Search to know the current scenario of your web page.


try cache:http://hiteshagja.blogspot.com(change domain name)


This will show that your page is in Google Cache or not.


Also try site:skywardsms.com -abcdefg(change domainname)


This search term tells the Google that please show me the pages according to domain which does not contain the word abcdefg. So you will get all the pages from the Google from your domain which does not contain the world abcdefg.

If you don’t find anything in the above search term then simply type your domain name in search textbox and press search button. If your site is in Google database then you will see in the search page otherwise it’s not. This is the case with all the search engines. You can try this thing in all the search engines.

Saturday, May 23, 2009

Search Engine Basics

  • Search engine is the place where you can search millions of web pages and directories for your desired search term.
  • Search engine uses thousands of computers that use software known as spiders or robots.
  • In case of Google its Google Bot
  • Two major search directories present in the web are Yahoo! and Open directory project
  • Different search engine uses different method for ranking of web page
  • Most of the search sites result come from different source.
  • Most popular search engines are
  1. Google.com
  2. AOL.com
  3. Yahoo.com
  4. MSN.com
  5. AskJeeves.com
  6. InfoSpace.com
  7. AltaVista.com
  8. Overture.com
  9. Netscape.com
  10. EarthLink.com
  11. LookSmart.com
  12. Lycos.com