John Stagich's Blog

Microsoft .Net Developer

IE8 and Browser Compatibility

clock April 20, 2009 08:34 by author johnstagich

Last Friday, I updated my browser on my Vista laptop to IE8.  I then checked my web site www.JohnStagich.com with the new browser.   Three of my web pages did not render as they did with IE7.  After spending a good amount of time tinkering with CSS style sheets and the like, I finally was able to get the web pages to look “similar” in IE7, IE8, and Firefox 3.0.8.  What a hassle.  Here is some of the code I used to achieve the similar look:

        var name = Request.Browser.Browser;

        HttpBrowserCapabilities bc;

        bc = Request.Browser;

 

        if (name == "IE" && bc.Version == "8.0")

        {

            btnSend.Style.Add("margin-left", "205px");

        }

        if (name == "IE" && bc.Version == "7.0")

        {

            btnSend.CssClass = "txtFloatLeft";

            btnSend.Style.Add("margin-left", "172px");

        }

        if (name == "Firefox")

        {

            btnSend.CssClass = "txtFloatLeft";

            btnSend.Style.Add("margin-left", "152px");

        }

I then read an article in Computerworld about browser compatibility.  It turns out that Microsoft is making an effort with IE8 to make it much more World Wide Web Consortium (W3W) compliant then previous versions of Internet Explorer.  Hence, the rendering changes of my web site with IE8. 

One developer in the article suggests devloping your web code first with Firefox and then making the necessary adjustments for the IE browsers.

If you are interested in finding out more about the differences between browsers, here is a good reference that contains compatibility tables for the different browser versions: QuirksMode.org.

John

 



April 2009 Quick Hits

clock April 13, 2009 12:17 by author johnstagich
  • SQL 2008 "Features"
While making minor modifications to a table, I would get an error when I tried to save.  To fix, go to Tools->Options->Designers->Table and Database Designers and uncheck the Prevent saving chages that require table re-creation in the Tabel Options Group Box.

IntelliSense cache needs to be manually updated after modifying tables. I discovered this "feature" after adding a rowguid column to a table.  I then tried to run an automated "Select All Rows" query, and intellisense errors apppeared in the query.  I was able to run the query successfully however.  The problem was that the IntelliSense cache needed to be updated.  It did not have the information about the new rowguid column.  To update Intellisense Cache, go to Edit->IntelliSense->Refresh Local Cache (Ctnl+Shift+R).  For more information, check out this link: http://blog.sqlauthority.com/2009/03/31/sql-server-2008-intellisense-does-not-work-enable-intellisense/


  • Here is a link to a to a three part series of articles from Bill Ramos on degugging T-SQL in Microsoft SQL Server 2008.

  • From tip number 56 Tips & Tricks for ASP.NET, IIS, and Visual Web Developer:

    1) From the keyboard: Ctrl+Shift+J will do it.  Wait for "Updating Intellisense..." message on status bar, then try invoking Intellisense again.
    2) From the menu: Select Edit menu, then Intellisense->Update Java Script Intelllisense.  Again, wait for "Updating Intellisense..." message on status bar, then invoke Intellisense. 

  • Want to Learn about PowerShell?  Here is a link to Idera's Practical PowerShell Video Series.

  • From Scott Mitchell's blog, a series of tutorials on ASP.Net Hosting.  http://www.asp.net/learn/hosting/

  • Here is a query to get a row count from each table in your database:

--Get all table names

BEGIN

Select Name into #tableNames from sysobjects where xtype = 'U' order by 1

Create Table #TableCount (TableName Varchar(100), NoOfRowCount bigint)

declare @name varchar(100)

--declare a cursor to loop through all tables

declare cur cursor for select * from #tableNames

open cur

fetch next from cur into @name while @@fetch_status=0

begin

Insert #TableCount

exec ('select ''' + @name + ''' , count(1) from ' + @name)

print 'Fetching count of table : ' + @name

fetch next from cur into @name

end

close cur

deallocate cur

--show the data

Select * from #TableCount drop table #tableNames

drop table #TableCount

END



About the author

I am the owner of Stagich Software Consulting.  Stagich Software Consulting specializes in developing Microsoft .Net/Microsoft SQL software applications.

 

Calendar

<<  April 2014  >>
MoTuWeThFrSaSu
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

View posts in large calendar

Month List

Category list

None

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

Sign In