A
active
My old post are getting messy so I thought I'd start a new one.
I get no error messages and using a breakpoint I see that
Image1.Attributes.Add executes.
But the image is still distorted.
Is there no features to help debugging code in Main.Master?
Any suggestions as to how to proceed would be appreciated.
in Main.master.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Image1.Attributes.Add("onclick", "resizeImg('" + Image1.ClientID + "')")
End Sub
in Main.Master
%@ Master Language="VB" CodeFile="Main.master.vb" Inherits="Default_master"
Debug="true"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
....
<head id="Head1" runat="server">
<title></title>
<script language="JavaScript" type="text/JavaScript">
<%--
function resizeImg(o) {
var o = document.getElementById(o);
var p=o.parentElement;
if ((o.clientWidth/o.clientHeight)>(p.clientWidth/p.clientHeight))
{o.style.width='100%';o.style.height=''}
else
{o.style.width='';o.style.height='100%'}
}
--%>
</script>
</head>
<body style="background-color: rgb(25,25,112)">
....
<asp:TableCell runat="server" ID="TableCellR4C1" Height="300"
BorderStyle="Groove">
<asp:Image ID="Image1" runat="server" AlternateText="Alternate Image"
Height="100%"
ImageAlign="Middle" ImageUrl="~/Images/churchdefault.jpg"
Width="100%" /> <%--OnLoad="resizeImg"--%>
</asp:TableCell>
I get no error messages and using a breakpoint I see that
Image1.Attributes.Add executes.
But the image is still distorted.
Is there no features to help debugging code in Main.Master?
Any suggestions as to how to proceed would be appreciated.
in Main.master.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
Image1.Attributes.Add("onclick", "resizeImg('" + Image1.ClientID + "')")
End Sub
in Main.Master
%@ Master Language="VB" CodeFile="Main.master.vb" Inherits="Default_master"
Debug="true"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
....
<head id="Head1" runat="server">
<title></title>
<script language="JavaScript" type="text/JavaScript">
<%--
function resizeImg(o) {
var o = document.getElementById(o);
var p=o.parentElement;
if ((o.clientWidth/o.clientHeight)>(p.clientWidth/p.clientHeight))
{o.style.width='100%';o.style.height=''}
else
{o.style.width='';o.style.height='100%'}
}
--%>
</script>
</head>
<body style="background-color: rgb(25,25,112)">
....
<asp:TableCell runat="server" ID="TableCellR4C1" Height="300"
BorderStyle="Groove">
<asp:Image ID="Image1" runat="server" AlternateText="Alternate Image"
Height="100%"
ImageAlign="Middle" ImageUrl="~/Images/churchdefault.jpg"
Width="100%" /> <%--OnLoad="resizeImg"--%>
</asp:TableCell>