ASP.Net Login Wrapper and Flash Cutoff Problem

816
3
06-14-2010 05:31 AM
JasonLin
New Contributor
Hi,

I've written a login page in ASP.Net to go with the Sample Flex Viewer. If a unauthenticated user visits our Flex page, he/she will be redirected to the login page. In order to do that, I have to use an ASP.Net wrapper to convert the index.html to index.aspx. The "wrapping" operation was done by manually adding ASP elements and then renaming it. However, the resulting Flex Viewer page is always cutoff'ed (see attached image). I'm sure it's something very simple that I just overlooked, but it's driving me crazy. On the side note, this only happens in Firefox but works just fine in IE 6.

If anyone can please shed some light on this, I'll be very grateful.

Thanks in advance.

[HTML]<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Login2.Secure.Test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <link rel="shortcut icon" href=".\favicon3.ico">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="ESRI, ArcGIS, Flex, Flex SDK, Viewer, GeoWeb"/>
    <meta name="description" content="Flex Viewer to demonstrate the best practice to develop GeoWeb application by leveraging the power of spatial technologies"/>
    <meta name="revised" content="version 1.0, Nov 14, 2008" />
 
    <title>Flex Viewer</title>

    <script src="AC_OETags.js" language="javascript"></script>

    <style>
        body { margin: 0px; overflow:hidden }
    </style>
</head>
<body scroll='no'>
<script language="JavaScript" type="text/javascript">
<!--
    AC_FL_RunContent(
     "src", "index",
     "width", "100%",
     "height", "100%",
     "align", "middle",
     "id", "index",
     "quality", "high",
     "bgcolor", "#6e6e6e",
     "name", "index",
     "allowScriptAccess", "sameDomain",
     "type", "application/x-shockwave-flash",
     "pluginspage", "http://www.adobe.com/go/getflashplayer"
);
// -->
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
   id="index" width="100%" height="100%"
   codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
   <param name="movie" value="index.swf" />
   <param name="quality" value="high" />
   <param name="bgcolor" value="#6e6e6e" />
   <param name="allowScriptAccess" value="sameDomain" />
   <embed src="index.swf" quality="high" bgcolor="#6e6e6e"
    width="100%" height="100%" name="index" align="middle"
    play="true"
    loop="false"
    quality="high"
    allowScriptAccess="sameDomain"
    type="application/x-shockwave-flash"
    pluginspage="http://www.adobe.com/go/getflashplayer">
   </embed>
</object>
</noscript>
</body>
</html>[/HTML]
Tags (2)
0 Kudos
3 Replies
Drew
by
Occasional Contributor III
I have seen this before.
To fix it simply remove the DOCTYPE  markup out of your page...

REMOVE THIS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Hopefully that solves it.

Drew
0 Kudos
JasonLin
New Contributor
That does solve the problem. Thanks so much, Drew.


REMOVE THIS
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
0 Kudos
grahamcooke
Occasional Contributor
or check
this thread
. There is a javascript solution to this problem which is caused by IE being rubbish and not catering for percentage values in height attribute of an object (or an iframe). This means you can still have standards compliant aspx page (ie not remove the doctype).

🙂
0 Kudos