Click here to Skip to main content
15,172,078 members

Comments by sivarajanb (Top 1 by date)

sivarajanb 4-Dec-10 12:52pm View
   
Deleted
Hi,

here is my code in aspx page

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!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">
<title></title>
<style type="text/css">
.divModalBackground
{
filter: alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
width: 100%;
background-color: #999988;
position: absolute;
top: 0px;
left: 0px;
z-index: 800;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:Image runat="server" ID="image2" ImageUrl="images/small/ground_main.jpg" />
<asp:Image runat="server" ID="image3" ImageUrl="images/small/R.C.C main.jpg" />
<asp:Image runat="server" ID="image4" ImageUrl="images/small/rehab_main.jpg" />
<asp:Image runat="server" ID="image5" ImageUrl="images/small/steel_main.jpg" />

<asp:Button ID="btnPop" runat="server" Text="Button" Style="display: none" />
<asp:Panel runat="server" ID="panel1" Style="display: none; background-color: White;">
<div style="text-align: center; padding: 0 5px">
<asp:Button runat="server" ID="btncancel" Text="close" /></div>
<img id="popImg" src="" />
</asp:Panel>
<asp:ModalPopupExtender ID="modal1" runat="server" BackgroundCssClass="divModalBackground"
TargetControlID="btnPop" PopupControlID="panel1" CancelControlID="btncancel"
OnCancelScript="hpop()" RepositionMode="RepositionOnWindowScroll">
</asp:ModalPopupExtender>
</div>
</form>
</body>

<script language="javascript" type="text/javascript">

function mpop(path) {
document.getElementById("popImg").src = path;
$find('modal1').show();
return false;
}
function hpop() {

$find('modal1').hide();
}

</script>

</html>

and is aspx.cs file i have the following code.
protected void Page_Load(object sender, EventArgs e)
{
// Button1.Attributes.Add("onclick", "return val();");
image2.Attributes.Add("onclick", "return mpop('" + image2.ImageUrl.Replace("small", "big") + "');");
image3.Attributes.Add("onclick", "return mpop('" + image3.ImageUrl.Replace("small", "big") + "');");
image4.Attributes.Add("onclick", "return mpop('" + image4.ImageUrl.Replace("small", "big") + "');");
image5.Attributes.Add("onclick", "return mpop('" + image5.ImageUrl.Replace("small", "big") + "');");


}

my question is i want to show progressbar in the modalpopup while the image gets loaded.