Archive by Author

How to get detailed ASP errors on Windows 2008 II7

To get the ASP error message and line number in code, do the following: 1. Go to Error pages 2. Under actions click Add 3. Enter status code 500.100 4. Select ‘Execute URL on this site’ 5. Enter your error page, i.e. 500.asp Now the Server.GetLastError object will contain the full error information.

How to display ASP errors on Windows 2008 II7

By default ASP errors are not displayed on a Windows 2008, II7 server. The default error message displayed simply says: Server Error 500 – Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed. This is for very good reason. Detailed error message can display sensitive […]

SEO Tools

Here are a couple of SEO Tools: SEO Automatic Tool – Tag Analyzer –

Truly Understanding ViewState

I was having some troubles with large ViewStates, so I found this article. It does an excellent job of explaining the inner workings of ViewState, and some of the common ways to misuse it. – Zachary

IE6 Float Bug

Lots of people like CSS and it certainly has it’s place. But when the most popular browser has a bug that prevents a simple div element from displaying properly we all get frustrated. All I wanted to do was have a box “float” to the right side of the page. It works great in IE7 and Firefox. […]

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 […]

Code to create a DataSet

Use this code to create a table and place it in a DataSet. // Create a new DataTable.System.Data.DataTable table = new DataTable(“Details”);// Declare variables for DataColumn and DataRow objects.DataColumn column;DataRow row;// Create new DataColumn, set DataType, // ColumnName and add to DataTable. column = new DataColumn();column.DataType = System.Type.GetType(“System.Int32”);column.ColumnName = “fk_agent_id”;column.ReadOnly = false;column.Unique = true;// Add the Column to […]

Code to create a DataRow and add it to a DataSet

Use this code to create a DataRow from a table in a DataSet and place it in the table in a DataSet. // Call a method to create the DataSet with a table in it.DataSet resultData = MakeDetailTable();DataRow row = resultData.Tables[“Details”].NewRow();row[“fk_agent_id”] = userInfo.account_id;row[“agent_name”] = userInfo.lname + “, “ + userInfo.fname;resultData.Tables[“Details”].Rows.Add(row);// Use the data in the GridView.gvReport.DataSource = […]

ASP On Error Resume Next

Last night I found a page with an “On Error Resume Next” that has a script error that has been causing problems on one of my servers for months. It took a long time to narrow down the source to a single site but then it didn’t take long to find the page with the […]