Click here to Skip to main content
15,894,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am working with multiple update panels. i want to know whether it is possible to associate different update panels to single update progress?

Also i am displaying loading image inside update progress within div tag. I also want to know whether can i change position of loading image depending upon condition?

Thanks
Posted

1 solution

If you have a div tag, then you can access that in javaScript/jQuery using the id attribute
Or
If you want to get it from code behind, then add one attribute runat="server" so that you can directly access that from code using the id.

After that change anything on the style attribute of that div from client-side or code behind.
 
Share this answer
 
Comments
PleaseHelpCP 6-May-13 6:06am    
Thanks Tadit Dash for your reply. I have already tried from code behind but did not get desired result. Will definitely try with javascript.
Ok. Try from javaScript and let me know.

Thanks...
PleaseHelpCP 6-May-13 6:30am    
tried from javascript but its not working. its not changing position of images inside div.
Ok. Can you post the code snippet of javaScript which you have tried ?
PleaseHelpCP 6-May-13 6:57am    
i have div named "divCommon" inside update progress control.
<asp:UpdatePanel ID="updProd" runat="server" UpdateMode="Conditional">

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
</table>



<asp:UpdateProgress ID="UpdateProgress" runat="server" AssociatedUpdatePanelID="updProd">
<ProgressTemplate>
<div id="divCommon" style="position:absolute;vertical-align:middle;text-align:center;">
<table border="1" cellpadding="0" cellspacing="0" width="120px" style="border:solid 1px #E96F00;background-color:White;height:30px;">
<tr>
<td align="center" nowrap="nowrap">
<img src="../images/loader.gif" alt="" /><span class="loadingtext">Loading...</span>
</td>
</tr>
</table>
</div>
</ProgressTemplate>


code inside javascript is as follows

if(opt=="A")
{
document.getElementById("divCommon").style.left="50px";
document.getElementById("divCommon").style.top="50px";
}
else
{
document.getElementById("divCommon").style.left="100px";
document.getElementById("divCommon").style.top="50px";
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900