This is my aspx code:
<asp:UpdatePanel ID="udp_Scroller" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:UpdateProgress ID="udprog_Scroller" runat="server" AssociatedUpdatePanelID="udp_Scroller">
<ProgressTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="Images/Banner.gif" Width=731 Height=115/>
</ProgressTemplate>
</asp:UpdateProgress>
<asp
laceHolder ID="ScrollerPlaceHolder" runat="server">
</asp
laceHolder>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="img_SearchButton" />
</Triggers>
</asp:UpdatePanel>
<script type="text/javascript">
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(initializeRequest);
prm.add_endRequest(endRequest);
var _postBackElement;
function initializeRequest(sender, e) {
if (prm.get_isInAsyncPostBack()) {
e.set_cancel(true);
}
_postBackElement = e.get_postBackElement();
if (_postBackElement.id.indexOf('img_SearchButton') > -1) {
$get('ctl00_ContentPlaceHolder1_udprog_Scroller').style.display = 'block';
}
}
function endRequest(sender, e) {
if (_postBackElement.id.indexOf('img_SearchButton') > -1) {
$get('ctl00_ContentPlaceHolder1_udprog_Scroller').style.display = 'none';
}
}
</script>
This is the code behind :
protected void img_SearchButton_Click(object sender, ImageClickEventArgs e)
{
Scroller_LoadUserControl();
}
private void Scroller_LoadUserControl()
{
ScrollerPlaceHolder.Controls.Clear();
UserControl uc = (UserControl) LoadControl("Scroller.ascx");
(uc as Scroller).ScrollerLoad(0,0,0,0,0,"",General.eAtHome.MyHome);
ScrollerPlaceHolder.Controls.Add(uc);
}
There is an image button with this name.
Its working! but I want the image to replace the usercontrol for the loading time...
Thanks!!! I'm clueless
<asp:UpdatePanel ID="udp_Scroller" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:UpdateProgress ID="udprog_Scroller" runat="server" AssociatedUpdatePanelID="udp_Scroller">
<ProgressTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="Images/Banner.gif" Width=731 Height=115/>
</ProgressTemplate>
</asp:UpdateProgress>
<asp

</asp

</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="img_SearchButton" />
</Triggers>
</asp:UpdatePanel>
<script type="text/javascript">
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(initializeRequest);
prm.add_endRequest(endRequest);
var _postBackElement;
function initializeRequest(sender, e) {
if (prm.get_isInAsyncPostBack()) {
e.set_cancel(true);
}
_postBackElement = e.get_postBackElement();
if (_postBackElement.id.indexOf('img_SearchButton') > -1) {
$get('ctl00_ContentPlaceHolder1_udprog_Scroller').style.display = 'block';
}
}
function endRequest(sender, e) {
if (_postBackElement.id.indexOf('img_SearchButton') > -1) {
$get('ctl00_ContentPlaceHolder1_udprog_Scroller').style.display = 'none';
}
}
</script>
This is the code behind :
protected void img_SearchButton_Click(object sender, ImageClickEventArgs e)
{
Scroller_LoadUserControl();
}
private void Scroller_LoadUserControl()
{
ScrollerPlaceHolder.Controls.Clear();
UserControl uc = (UserControl) LoadControl("Scroller.ascx");
(uc as Scroller).ScrollerLoad(0,0,0,0,0,"",General.eAtHome.MyHome);
ScrollerPlaceHolder.Controls.Add(uc);
}
There is an image button with this name.
Its working! but I want the image to replace the usercontrol for the loading time...
Thanks!!! I'm clueless