Feedback Form

Sunday, February 22, 2009

Follow me

Follow me on my personal website amrelgarhy.com

Thursday, November 20, 2008

Connecting to Server When All Active Sessions are Used

Simply use mstsc -console if didn't work then use mstsc -admin.

Reference

Saturday, October 25, 2008

Microsoft new home page design

microsoft changed their home page design a little bit, now you can reach everything from the home page more easy and more clear.

MicrosoftHomePage


kick it on DotNetKicks.com

Monday, October 20, 2008

Small Tip, Restore Database with replace "MSSQL 2005"

RESTORE DATABASE AdventureWorks
    FROM DISK = 'C:\BackupAdventureworks.bak'
            WITH REPLACE

Wednesday, October 15, 2008

Small Tips "IIS Restart"

iisreset /noforce

reference: http://technet.microsoft.com/en-us/library/cc758159.aspx

Sunday, September 14, 2008

a href=”javascript:void(0);” — avoid the void

ist2_3163272-computer-programming-code-with-pen

One of the most important hints about javascript and web development.

a href=”javascript:void(0);” — avoid the void


kick it on DotNetKicks.com

Wednesday, September 10, 2008

DotNetNuke container customized

You will find in the following zipped file the default Image Header - Color Background container but I made customized it to use div instead of tables.

http://cid-fa1922bb57748e08.skydrive.live.com/self.aspx/Shared%20Source/NewContainer.zip

dnn-seo-spider-net

kick it on DotNetKicks.com

DotNetNuke skin customized

You will find in the following zipped file the default DNN-Blue skin but I made customized it to use div instead of tables and to be 4 columns instead of 3.

Note: You will find the admin panel down instead of top.

http://cid-fa1922bb57748e08.skydrive.live.com/self.aspx/Shared%20Source/NewSkin.zip

dotnetnuke_by_t3kton

kick it on DotNetKicks.com

Wednesday, September 03, 2008

Browsers War




They will fight "Browsers Companies", we will win "Users" :)

Friday, August 29, 2008

Just a question "Yahoo Shuts Down Mash"


Yahoo Shuts Down Mash, 0-4 On Social Networking


What will happen for you if you saw the following news while checking your mails or RSS?

Google Shuts Down Google Docs (will lose all your documents?)
Google Shuts Down Blogger (will lose all your ideas you wrote?)
Google Shuts Down Gmail (will lose your mails? "hell")

Facebook Shuts Down (will lose contact to all you friends?)



My Advice:
Use these tools, they are nice and its a must to use them, but please don't put all what you have there, to make your life rely on them, you still have space on your hard disc for saving files, you still have a small note to save your ideas, contacts,.......

Saturday, August 16, 2008

List of countries, cities, languages

WORLD_MAP_by_SUNZHINE

You will find in the following links list of countries, cities, and their languages in CSV format, you can import into any database:

Countries:

http://www.ziddu.com/download/1936707/Country.csv.html

Cities:

http://www.ziddu.com/download/1936708/City.csv.html

Languages:

http://www.ziddu.com/download/1936713/Language.csv.html

and the following is the sql script to create these tables in sql server 2005:

USE [World]
GO
/****** Object: Table [dbo].[City] Script Date: 08/16/2008 14:48:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[City](
[ID] [int] NOT NULL,
[Name] [nvarchar](35) COLLATE Arabic_CI_AS NOT NULL,
[CountryCode] [nvarchar](3) COLLATE Arabic_CI_AS NOT NULL,
[District] [nvarchar](20) COLLATE Arabic_CI_AS NULL,
[Population] [int] NULL
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[Country] Script Date: 08/16/2008 14:48:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Country](
[Code] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[Name] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[Continent] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[Region] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[SurfaceArea] [nvarchar](150) NOT NULL,
[IndepYear] [nvarchar](150) NULL,
[Population] [nvarchar](150) NOT NULL,
[LifeExpectancy] [nvarchar](150) NULL,
[GNP] [nvarchar](150) NULL,
[GNPOld] [nvarchar](150) NULL,
[LocalName] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[GovernmentForm] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[HeadOfState] [nvarchar](150) COLLATE Arabic_CI_AS NULL,
[Capital] [nvarchar](150) NULL,
[Code2] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
CONSTRAINT [PK_Country] PRIMARY KEY CLUSTERED
(
[Code] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[Language] Script Date: 08/16/2008 14:48:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Language](
[CountryCode] [nvarchar](50) COLLATE Arabic_CI_AS NOT NULL,
[Language] [nvarchar](50) COLLATE Arabic_CI_AS NOT NULL,
[IsOfficial] [bit] NULL,
[Percentage] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
CONSTRAINT [PK_Language] PRIMARY KEY CLUSTERED
(
[CountryCode] ASC,
[Language] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]


kick it on DotNetKicks.com

Saturday, August 02, 2008

Subsonic going visual ( SubStage )

Subsonic is going up in subsonic,

everyday we feel how subsonic is a very good tool.

They created a good visual tool called SubStage to easily  generate code.

http://subsonicproject.com/2-1-pakala/using-substage/

 subsonic

Saturday, July 05, 2008

Select an option in select tag by value

<SELECT name="fruit">
<OPTION value="apple">apple</option>
<OPTION value="orange">orange</option>
<OPTION value="pear">pear</option>
</SELECT>

If you need to select an option in a select tag by index you can do the following:

document.getElementById('dropDown').selectedIndex = 1;


But if you want to select an option in a select tag by value you can do the following:

for(var i=0; i<document.getElementById('dropDown').options.length;i++)
        if(document.getElementById('dropDown').options[i].value == "MYVALUE")
document.getElementById('dropDown').selectedIndex = i;



kick it on DotNetKicks.com

Thursday, June 19, 2008

Disable or stop AutoCompleteExtender (Javascript)

To disable or stop the AutoCompleteExtender from running or calling its service to load auto suggested list, (Using Javascript)

Its very simple

-Set the BehaviorID property for the AutoCompleteExtender

<ajaxToolkit:AutoCompleteExtender
runat="server"
ID="autoSuggest"
TargetControlID="SearchBox"
ServiceMethod="GetSuggestedList"
ServicePath="~/_Services/AutoSuggest.asmx"
MinimumPrefixLength="2"
CompletionInterval="1"
EnableCaching="true"
CompletionSetCount="10"
CompletionListCssClass="AutoSuggestSearch"
CompletionListItemCssClass="listItem"
CompletionListHighlightedItemCssClass="highlightedListItem"
BehaviorID="autoSuggest"
/>



Then using javascript just write:




function selectType()
{
var a = $find("autoSuggest");
a.set_serviceMethod('');
}


By setting the service method to empty, the autosuggestextender will not find the service to call and will stop working

kick it on DotNetKicks.com

Tuesday, June 17, 2008

Window.open invalid argument

Just a hint about a simple problem could happen to you while writing javascript code to open a new browser window using window.open, it may give you the following error message box

windowopenerror

in case you wrote it like that:

window.open("http://www.google.com", "This Is My Page", "status=1, width=300,height=500");

where is the wrong argument?

its the name argument "This Is My Page"

You can write it like that (without spaces):

window.open("http://www.google.com", "ThisIsMyPage", "status=1, width=300,height=500");

Note:

It wont give you any errors in firefox in both cases, this error just happen in IE.

window.open good article


kick it on DotNetKicks.com

Saturday, May 31, 2008

Post to your blog without ever leaving Firefox (ScribeFire)

Post to your blog without ever leaving Firefox

ScribeFire is an extension for the Mozilla Firefox Web Browser that integrates with your browser to let you easily post to your blog: you can drag and drop formatted text from pages you are browsing, take notes, and post to your blog.

Wednesday, May 28, 2008

Links

The 7 Habits of Highly Effective Developers
A Dual Slider for AJAX Control Toolkit

What's Killing Twitter: Twitter Gets Help Digging its Grave

Ranking Your Blog - Managing and Gaining Popularity

Free eBook - Best of Simple Talk ASP.NET

 

Hooked on LINQ - Developers' Wiki for .NET Language Integrated Query

 

ASP.NET - Precompiled Site Options

 

The difference between ID, ClientID and UniqueID

 

WebServiceStudio

 

IETester Renders Sites like Internet Explorer 5.5 Through 8

 

15 Tools to Help You Develop Faster Web Pages

Take care from your HTML comments

Commenting in html code may make a web page renders the wrong way,

The problem i faced is if you wrote:

<!-- some comments <!-- another some comments -->

OR

<!------> hello-->

Not all HTML parsers get this right, so my problem was that the VS and dream weaver consider it as comments but in the browser i saw "some comments, hello-->" showing, so the browser didn't consider it as a HTML comment, so take care from this point.

 

See some more hints about html comments

Thursday, May 22, 2008

The biggest collection of "Programming Jokes"

The best and biggest programming jokes i read online:

http://www.devtopics.com/best-programming-jokes/




kick it on DotNetKicks.com

Friday, May 16, 2008

Add Microsoft Ajax reference to javascript file

To use microsoft ajax library reference inside your javascript file and see the Intellisense (VS 2008) while writing your javascript code:


/// <reference name="MicrosoftAjax.debug.js" />


kick it on DotNetKicks.com