 |
 |
|
Changing the color and style of scrollbar
Wednesday 07/11/2007 (10:25)
|
|
 |
|
scrollbar-face-color: #d6dff7;
scrollbar-arrow-color: #000000;
scrollbar-track-color: #c6cfe7;
scrollbar-shadow-color: #000000;
scrollbar-highlight-color: #d6df7;
scrollbar-3dlight-color: #d6dff7;
scrollbar-darkshadow-Color: #d6dff7;
|
|
|
 |
 |
|
 |
 |
 |
|
Showing Local Time Using JavaScript
Wednesday 07/11/2007 (10:20)
|
|
 |
|
function LocalTime()
{
var curDateTime = new Date()
var curHour = curDateTime.getHours()
var curMin = curDateTime.getMinutes()
var curSec = curDateTime.getSeconds()
var curTime =
((curHour < 10) ? "0" : "") + curHour + ":"
+ ((curMin < 10) ? "0" : "") + curMin + ":"
+ ((curSec < 10) ? "0" : "") + curSec
return curTime;
}
function ShowLocalTime()
{
document.getElementById("SpanTime").innerHTML = LocalTime();
setTimeout("ShowLocalTime()",1000);
}
"SpanTime" is the ID of the element that you want to show time on it. I used a span.
|
|
|
 |
 |
|
 |
 |
 |
|
Applying some rules to all types of HTML objects
Wednesday 07/11/2007 (09:42)
|
|
 |
|
|
 |
 |
|
 |
 |
 |
|
Importing CSS File
Monday 05/11/2007 (19:19)
|
|
 |
|
You can import css rules from another css file:
@import url(base.css);
|
|
|
 |
 |
|
 |
 |
 |
|
Button Background Color
Sunday 04/11/2007 (12:32)
|
|
 |
|
Try this css rule to set a background color for all buttons in your website:
INPUT
{
color: expression(this.type=="button"?'red':'');
}
|
|
|
 |
 |
|
 |
 |
 |
|
unsigned char in C#?
Wednesday 17/10/2007 (18:25)
|
|
 |
|
unsigned char is byte in C#
|
|
|
 |
 |
|
 |
 |
 |
|
Defining index on SQL Server database and Web Applications performance
Monday 17/09/2007 (14:03)
|
|
 |
|
If you are using MS SQL Server as your database in .NET Applicaions, do not forget to define Index on data fileds that are used frequently as the key field within the SQL commands. This will increase speed of your SQL Queries or Stored procedures and you will gain more overall speed in your application; Specially when there are many number of records in some tables and your going to join them within SQL commands and filtering the result dataset based on some fields values.
|
|
|
 |
 |
|
 |
 |
 |
|
Worker processes of application pools and Applications performance
Monday 17/09/2007 (13:57)
|
|
 |
|
One of the most important settings that can boost your web application performance is setting the number of worker processes to something bigger than 1.
But remember that you can not set it to any number that you like! setting to value more than 5 must be done very carefully. You may run out of RAM or may need more CPU speed! Usually setting the value to a number between 3 and 5 is good.
|
|
|
 |
 |
|
 |
 |
 |
|
Sending email using Google account and System.Net.Mail
Monday 17/09/2007 (13:49)
|
|
 |
|
MailMessage mailMsg = new MailMessage();
mailMsg.From = new MailAddress("youremail@gmail.com", "DisplayName");
mailMsg.To.Add(new MailAddress("destination@gmail.com"));
mailMsg.Subject = string.Format("Subject");
mailMsg.Body = "<html><body>Hi</body></html>";
mailMsg.IsBodyHtml = true;
mailMsg.BodyEncoding = System.Text.Encoding.Unicode;
mailMsg.Priority = MailPriority.High;
System.Net.Mail.SmtpClient smtpClient = new SmtpClient("smtp.gmail.com", 587);
smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
smtpClient.Credentials = new System.Net.NetworkCredential("your google account without @gmail.com", "password");
smtpClient.EnableSsl = true;
smtpClient.Send(mailMsg);
|
|
|
 |
 |
|
 |
 |
 |
|
Problem with LIKE clause and MS Access database
Monday 17/09/2007 (13:31)
|
|
 |
|
If you have .NET dataset and MS Access database use % instead of * in your LIKE cluase. When you wan to run the SQL command within the microsoft access environment you must use * but using * while you are running the query in your .NET application causes exception.
|
|
|
 |
 |
|
 |
|
|