Google running AdWords ads in Newspapers


Saturday, December 5, 2009


Google running AdWords ads in newspapers

Please see this picture to see at which column of newspaper show google ads.

Google has shown its ads in the Dec 12 sports section of the Sun-Times.

I dont know, how google is going to make track of Pay Per Click (PPC) or Pay Per View (PPV).

I guess, Now the googles next step would be, how to show google search engine in Newspapers.

Imagine the day, you woke up in morning and you are getting late for the office and you just picked up the newspaper and typed your keyword in the search column of newspaper and you find your search without wasting time.

Imagine the day that would be, Hope the google get this feature soon in newspaper.

Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Asp.Net Developer
Indianic Infotech Ltd (India)
rajesh@indianic.com

Get variables from web.config and global.asax





There are two methods, you can assign variable at one place and call it from through out the website.

The first is, Declare the variable in web.config and call it in any aspx.cs page and the second is, Declare the variable in global.asax and call it in any aspx.cs page.

The first one is very usefull because you can edit it directly form the FTP editor.

Please find explanation and code of both method below,


First Method:
web.config
<appSettings>
<add key="siteurl" value="www.indianic.com"/>
<add key="TempDir" value="./uploads"/>
</appSettings>

Default.aspx.cs
ConfigurationSettings.AppSettings["siteurl"].ToString();
ConfigurationSettings.AppSettings["TempDir"].ToString();


Second Method:
global.asax
void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started
Application["siteurl"] = "www.indianic.com";
Application["TempDir"] = "./uploads";
}

Default.aspx.cs
string smtphost = Application["siteurl"].ToString();
string userid = Application["TempDir"].ToString();


Please use any of the above method which is needed in your application.

Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Asp.Net Developer
Indianic Infotech Ltd (India)
rajesh@indianic.com

How to align two div in same row ?


Tuesday, December 1, 2009

This is one of the Issue which make developer to pull His/Her Hair,

To align two div in same row, is really very simple, after you know, how it is done.

See the Demo below,

Code :
<div>Rajesh</div><div>Singh</div>


Output :
Rajesh
Singh


Solution to this Problem,

Code :
<div style="float:left;">Rajesh</div><div>Singh</div>


Output :
RajeshSingh


Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Asp.Net Developer
Indianic Infotech Ltd (India)
rajesh@indianic.com

How to use Trim() Function in SQL server 2005 ?


Tuesday, November 24, 2009

There is no perticular function like Trim in SQL server but you can achieve Trim like functionality by doing Left Trim and Right Trim, to get complete trimed Text.

LTRIM is used to : Trim Text form left hand side or in other word remove space form left hand side.
RTRIM is used to : Trim Text from Right hand side or in other word remove space form Right hand side.

Example :

You can Use this query directly in SQL Server 2005

SELECT    *
FROM view_rapdata_full_member_pull
WHERE LTRIM(RTRIM(First_Name)) +' '+ LTRIM(RTRIM(Last_Name))
like '%Rajesh Singh%'
or
LTRIM(RTRIM(Last_Name)) +' '+ LTRIM(RTRIM(First_Name))
like '%
Rajesh Singh%'


You can Use this query in C# code to make search.

SELECT    *
FROM view_rapdata_full_member_pull
WHERE LTRIM(RTRIM(First_Name)) +' '+ LTRIM(RTRIM(Last_Name))
like '%" + txtsearch.Text + "%'
or
LTRIM(RTRIM(Last_Name)) +' '+ LTRIM(RTRIM(First_Name))
like '%" + txtsearch.Text + "%'


Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Asp.Net Developer
Indianic Infotech Ltd (India)
rajesh@indianic.com

How to stop right clicking of mouse on my web page ?


Monday, November 23, 2009

You can just put single line code in body tag, to stop copy your website content and copy your image.

Here is the code

<BODY oncontextmenu="return false">


Hope this post will help you,
if yes please put comment below of this page,
Rajesh Singh,
Asp.Net Developer
Indianic Infotech Ltd (India)
rajesh@indianic.com