10/01/2011

Div with scroll, Like multi line text box

To create div with scroll like multi line text box, only using CSS to apply this idea.

Into HEAD tag, Add the following code



<style>
 div.Terms {
  background:#ffffff none repeat scroll 0 0;
  border:1px solid #a0a0a0;
  margin:5px;
  padding:5px;
  position:relative;
  width:1000px;
  height:300px;
  overflow:auto;
 }

 div.Content { 
  margin:10px;
  padding:5px;
  border:0px solid #666;
  width:950px;
  zheight:500px;
 }
</style>



Into BODY tag, add the following code
<table>
<tr>
<td>
The Terms:
<br />

</td>
</tr>
<tr>
<td>

<div class="Terms" id="Terms">
<div class="Content">
The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content The Content 
</div>
</div>
</td>
</tr>
</table>


Read more...

03/01/2011

Facebook than Google in the most visited sites in 2010





Read more...

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...