locked
Adjust Different Brwoser for web page design RRS feed

  • Question

  • User1434656350 posted

    Whenever I trying to design web page there is one problem. that is browser capabilities

    i found solution at

    http://aspnet.4guysfromrolla.com/articles/050504-1.aspx 

     

    just copy paste this code in web.config under system tag

    <!-- GECKO Based Browsers (Netscape 6+, Mozilla/Firebird, ...) //-->
      <case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)? (?'type'[^/\d]*)([\d]*)/(?

    'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*">
        browser=Gecko
        type=${type}
        frames=true
        tables=true
        cookies=true
        javascript=true
        javaapplets=true
        ecmascriptversion=1.5
        w3cdomversion=1.0
        css1=true
        css2=true
        xml=true
        tagwriter=System.Web.UI.HtmlTextWriter
        <case match="rv:(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
          version=${version}
          majorversion=${major}
          minorversion=${minor}
          <case match="^b" with="${letters}">
            beta=true
          </case>
        </case>
      </case>
     
      <!-- AppleWebKit Based Browsers (Safari...) //-->
      <case match="AppleWebKit/(?'version'(?'major'\d)(?'minor'\d+)(?'letters'\w*))">
        browser=AppleWebKit
        version=${version}
        majorversion=${major}
        minorversion=0.${minor}
        frames=true
        tables=true
        cookies=true
        javascript=true
        javaapplets=true
        ecmascriptversion=1.5
        w3cdomversion=1.0
        css1=true
        css2=true
        xml=true
        tagwriter=System.Web.UI.HtmlTextWriter
        <case match="AppleWebKit/(?'version'(?'major'\d)(?'minor'\d+)(?'letters'\w*))( \(KHTML, like Gecko\) )?(?'type'[^/\d]*)/.*$">
          type=${type}
        </case>
      </case>
      <!-- Konqueror //-->
      <case match = "Konqueror/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'));\w*(?'platform'[^\)]*)">
        browser=Konqueror
        version=${version}
        majorversion=${major}
        minorversion=${minor}
        platform=${platform}
        type=Konqueror
        frames=true
        tables=true
        cookies=true
        javascript=true
        javaapplets=true
        ecmascriptversion=1.5
        w3cdomversion=1.0
        css1=true
        css2=true
        xml=true
        tagwriter=System.Web.UI.HtmlTextWriter
      </case>
    </browserCaps>  
     
     
    change HtmlTextWriter to Html32TextWriter 

     

     

     

    Friday, January 18, 2008 1:10 AM

All replies

  • User-2074625069 posted

    Brilliant Thanks!

    Saturday, January 19, 2008 8:02 AM