I have a issue, in a updatepanel, i have a image control that has a image loaded. i need a way to clear that image and then run server side function where i still have access to data from the current form.
sorry, im not a java person, trying to learn it as i go, so, can this be called from a button , or is this executed every time the page refreshed from the update panel?
DinoCultraro
Member
26 Points
5 Posts
Image control problem. urgent
Mar 02, 2012 02:58 AM|LINK
Hi all.
I have a issue, in a updatepanel, i have a image control that has a image loaded. i need a way to clear that image and then run server side function where i still have access to data from the current form.
any ideas?
Thanks
santosh.jagd...
Star
7625 Points
1454 Posts
Re: Image control problem. urgent
Mar 02, 2012 03:09 AM|LINK
try this one
< script type="text/javascript"> var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_pageLoaded(pageLoaded); var c = 0; function pageLoaded(sender, args) { var img = document.getElementById("Control"); c++; img.src = img.src + "?" + c; }plz mark as ANSWER if it helps u
MCP
DinoCultraro
Member
26 Points
5 Posts
Re: Image control problem. urgent
Mar 02, 2012 06:03 PM|LINK
sorry, im not a java person, trying to learn it as i go, so, can this be called from a button , or is this executed every time the page refreshed from the update panel?
thanks
DinoCultraro
Member
26 Points
5 Posts
Re: Image control problem. urgent
Mar 02, 2012 06:22 PM|LINK
found my own answer thanks for the help. works great,\
for anyone who need to know, i created the following on the page load
btn.Attributes.Add("onclick", "javascript:function()")