29/12/2010

Sharepoint Portal

Al Madinah Regional Municipality:

http://www.amana-md.gov.sa/



Read more...

Sharepoint Portal

Jazan University:


http://www.jazanu.edu.sa/


Read more...

14/12/2010

MultiLine TextBox Issue With Chrom Browser

To prevent users from enlargement the multi line text box control,add the following CSS property:

resize: none

Only!!!


Read more...

11/12/2010

Riyadh Community Summit - 23 December 2010



You are invited to the following event:
Riyadh Community Summit (December2010)

Date:
Thursday, December 23, 2010 from 12:30 PM - 5:30 PM (GMT+0300)

Location:
King Fahad - North Between Exit 4 and 5 Going to Al Qassim
Riyadh 11512
Saudi Arabia

For more information click here




Read more...

13/11/2010

Adding Client Confirmation

To add client confirmation, such us when you want delete item:



OnClientClick = '<%#Eval("FieldName", "Javascript:return confirm(\"{0}\")") %>'

Read more...

02/11/2010

web service: The test form is only available for requests from the local machine.

if you create aweb service, and you want to test it from another server machine, the follwoing message will be appear:
"The test form is only available for requests from the local machine."
so, you should add the follwoing code into your web.config:
<webServices>
    <protocols>
        <add name="HttpSoap12" />
        <add name="HttpSoap" />
        <add name="HttpGet" />
        <add name="HttpPost" />
    </protocols>
</webServices>


before

</system.web>

Read more...

20/02/2010

Get The Serial Number Of The Hard Disk

You can prevent the user from entering your application but who has the same serial number by using the following code:





protected void Page_Load(object sender, EventArgs e)
{
lblResult.Text = GetHDDSerialNumber("c");
}

/////////////////////////////////////////
public string GetHDDSerialNumber(string drive)
{
//check to see if the user provided a drive letter
//if not default it to "C"
if (drive == "" || drive == null)
{
drive = "C";
}
//create our ManagementObject, passing it the drive letter to the
//DevideID using WQL
ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"" + drive + ":\"");
//bind our management object
disk.Get();
//return the serial number
return disk["VolumeSerialNumber"].ToString();
}

Read more...

To know the number of seconds that elapsed since the computer starts

        Int64 SecondsFromStart;

SecondsFromStart = Environment.TickCount / 1000;

lblResult.Text = SecondsFromStart.ToString();

Read more...

Check If The Input Is Numaric Or Not

To check if the input from text box is numaric or not, can we use the following idea:

1- In .aspx page, create TextBox control, and rename it to txtInput.
2- Create Label control, and rename it to lblResult.
3- Create Button control, and rename it to btnCheck.
4- In code behind, write the following code:


    protected void Page_Load(object sender, EventArgs e)
{
if (IsNumeric(txtInput.Text, IsNumericType.Integer))
{
lblResult.Text = "The Input Is Numeric";
}
else
{
lblResult.Text = "The Input Is Not Numeric";
}
}








public enum IsNumericType : int
{
Integer = 0,
Decimal = 1,
Double = 2,
Int64 = 3,
Byte = 4,
Float = 5
}








public static bool IsNumeric(string Input, IsNumericType NumericType)
{
try
{
switch (NumericType)
{
case IsNumericType.Byte:
byte ByteResult = byte.Parse(Input);
return true;
case IsNumericType.Decimal:
decimal DecResult = decimal.Parse(Input);
return true;
case IsNumericType.Double:
double DblResult = double.Parse(Input);
return true;
case IsNumericType.Float:
float FltResult = float.Parse(Input);
return true;
case IsNumericType.Int64:
Int64 I64Result = Int64.Parse(Input);
return true;
case IsNumericType.Integer:
int intResult = int.Parse(Input);
return true;
default:
return false;
}
}
catch { return false; }
}


5- Test it.


Read more...

18/02/2010

Error In facebook


Error in facebook??!!!!!!!! impossible..... but no possible.


Read more...