I have an Image control a Master Page that the user can change from a content page. I would like to update the picture using an update panel, but I dont see how I can trigger it from the content page.
OK I get no errrors, but the image on the master page is not updated. I have to leave the page and re-enter , so when it does postback it works, but it is not getting an asynch postback.
(Master.FindControl("iprofile")
as
System.Web.UI.WebControls.Image).ImageUrl
= filepath;
Member
120 Points
574 Posts
Update Panel On Master Page
Apr 02, 2014 07:20 PM|dieseldave|LINK
I have an Image control a Master Page that the user can change from a content page. I would like to update the picture using an update panel, but I dont see how I can trigger it from the content page.
The master page image
This is my attempt at triggering the update Panel - it doesnt work...
Contributor
5590 Points
1297 Posts
Re: Update Panel On Master Page
Apr 02, 2014 07:27 PM|dotnetzoom|LINK
One simple solution would be removing update mode
content page:
Member
120 Points
574 Posts
Re: Update Panel On Master Page
Apr 02, 2014 09:40 PM|dieseldave|LINK
that returns an error -'Cannot convert type 'System.Web.UI.Control' to 'Image''
Contributor
5590 Points
1297 Posts
Re: Update Panel On Master Page
Apr 02, 2014 09:53 PM|dotnetzoom|LINK
It seems like you are using System.Drawing in the page class. Make sure that proper type is used
Member
120 Points
574 Posts
Re: Update Panel On Master Page
Apr 04, 2014 10:27 PM|dieseldave|LINK
OK I get no errrors, but the image on the master page is not updated. I have to leave the page and re-enter , so when it does postback it works, but it is not getting an asynch postback.
(Master.FindControl("iprofile") as System.Web.UI.WebControls.Image).ImageUrl = filepath;