Welcome Guest! To enable all features please
Login or Register.
Steps to reproduce this issue.
1. On Edit Profile page select a country like United States
or any other country. One can see flag images in this step.
2.After step 1, ajax postback occurs and after the request finishes, open the Country drop down and you will see that images are missing.
A video of this issue can be seen at Video of this Issue
Edited by user
| Reason: Not specified
I was able to resolve this issue. All that was needed was to set the property ImageLocation
property of Country ImageListBox. This property was set in code-behind when EditProfile page first loaded in BindData( ) method, but it is not being persisted across postbacks. So when Country drop down makes an ajax postback, in the Render method of ImageListBox.cs control, this property is blank.
So, I set it in markup for this control in controls/EditUserProfile.ascx user control and then on ajax postback the images for countries are still visible. I have tested and tried this code.
<YAF:ImageListBox ID="Country" AutoPostBack="true"
But, I think a better option would be to persist the property ImageLocation
in ImageListBox control by using sample code as below. I have tested this code also and it works. This will take care of regular as well as ajax postbacks from ImageListBox on all pages unlike the first solution that will work only on a single page.Code change in ImageListBox.cs in YAF.Controls project
public string ImageLocation
string imageLocation = ViewState["ListBoxImageLocation"] as string;
return string.IsNullOrWhiteSpace(imageLocation) ? string.Empty : imageLocation;
ViewState["ListBoxImageLocation"] = value;
Thanks issue will be fixed in the next release.
- You cannot post new topics in this forum.
- You cannot reply to topics in this forum.
- You cannot delete your posts in this forum.
- You cannot edit your posts in this forum.
- You cannot create polls in this forum.
- You cannot vote in polls in this forum.