Archive / HTML

RSS feed for this section

Clear previously entered text box values

Sometimes we do not want the browser to display previously entered values in an input box. These are the values that dispaly somewhat like a drop down list. To clear previously entered text box values we can add the following attibute to the input box parameters:     autocomplete=”off” This will not show data that had been entered […]

GridView.RowDataBound Event No Data

I was trying to use the GridView.RowDataBound event to change the background color of the row in a GridView. But the data was missing. Here is what I trying: void gvReport_RowDataBound(Object sender, GridViewRowEventArgs e){   if (e.Row.RowType == DataControlRowType.DataRow)   {      if (e.Row.Cells[1].Text.IndexOf(“Total:”) > 0)         e.Row.BackColor = System.Drawing.Color.FromArgb(247, 249, 223);   }} But my e.Row.Cells[1].Text had no data in it. I am binding […]

Setting Page Meta Information at Runtime

I have a MasterPage and some child pages. The content for the child pages comes from a database. I have a form in the Admin section of my site for editing pages. You can set the Page Title, the Meta Description, Keywords, and page Content. Accessing the title is easy, because the title of the content pages […]

Outlook Stationary

To create stationary for Outlook follow these steps: Create stationary as a local .htm page. Put the images in the same folder. Copy the .htm page and images into one of these folders:Vista – C:\Users\<logon user>\AppData\Roaming\Microsoft\StationeryXP – C:\Documents and Settings\<logon user>\Application Data\Microsoft\Stationery Then your stationary will be listed as a theme under the Signatures and Stationary […]

JavaScript Code To Toggle Check Boxes

Here is some JavaScript code to toggle check boxes (same action as radio buttons). In the page load event register the JavaScript:    chkTwoYear.Attributes.Add(“onclick”, “javascript: CheckTwoProgram(” + chkTwoYear.ClientID + “);”);    chkFourYear.Attributes.Add(“onclick”, “javascript: CheckFourProgram(” + chkFourYear.ClientID + “);”); In the HTML of the page add the JavaScript: <SCRIPT Language=”JavaScript”><!– function CheckTwoProgram(id) {    if(id.checked)       document.forms[0].chkFourYear.checked=false;    } function CheckFourProgram(id) {    if(id.checked)       document.forms[0].chkTwoYear.checked=false;    } //–> </SCRIPT>

Email Encoder

When putting email addresses on a web page it is recommended to encode them. There are many web crawlers scanning pages to harvest email addresses. Here is an easy to use tool to encode the email address.