Follow me on my personal website amrelgarhy.com
Sunday, February 22, 2009
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.
Posted by Amr at 1:46 PM 0 comments
Labels: Tips
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.
Posted by Amr at 9:44 PM 2 comments
Labels: websites
Monday, October 20, 2008
Small Tip, Restore Database with replace "MSSQL 2005"
RESTORE DATABASE AdventureWorks
FROM DISK = 'C:\BackupAdventureworks.bak'
WITH REPLACE
Posted by Amr at 10:23 AM 1 comments
Wednesday, October 15, 2008
Small Tips "IIS Restart"
iisreset /noforce
reference: http://technet.microsoft.com/en-us/library/cc758159.aspx
Posted by Amr at 1:14 AM 0 comments
Labels: Tips
Sunday, September 14, 2008
a href=”javascript:void(0);” — avoid the void
One of the most important hints about javascript and web development.
a href=”javascript:void(0);” — avoid the void
Posted by Amr at 7:45 PM 2 comments
Labels: JavaScript, Tips
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
Posted by Amr at 9:11 PM 0 comments
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
Posted by Amr at 7:22 PM 0 comments
Labels: .Net, Asp.Net, HTML, JavaScript, Open Source, Tips, websites
Wednesday, September 03, 2008
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,.......
Posted by Amr at 8:49 PM 0 comments
Labels: Tips
Saturday, August 16, 2008
List of countries, cities, languages
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]
Posted by Amr at 3:00 PM 18 comments
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.
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>
document.getElementById('dropDown').selectedIndex = 1;But if you want to select an option in a select tag by value you can do the following:
Posted by Amr at 3:28 AM 0 comments
Labels: JavaScript
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
Posted by Amr at 1:53 AM 3 comments
Labels: Ajax, AjaxToolkit, Asp.Net, JavaScript
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
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.
Posted by Amr at 11:19 PM 11 comments
Labels: JavaScript
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.
Posted by Amr at 1:15 AM 1 comments
Wednesday, May 28, 2008
Links
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
Posted by Amr at 2:02 AM 0 comments
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
Posted by Amr at 2:01 AM 0 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/
Posted by Amr at 3:53 PM 1 comments
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" />
Posted by Amr at 2:35 PM 0 comments
Labels: .Net, Ajax, AjaxToolkit, Asp.Net, JavaScript






