YAFLogo

Posted by: vcsharp - Monday, 20 November 2017 07:15:06
Steps to reproduce this issue. 1. On Edit Profile page select a country like [i]United States[/i] 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 [url=https://goo.gl/zwZ79w]Video of this Issue[/url]

[/code] But, I think a better option would be to persist the property [i]ImageLocation[/i] 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. [b]Code change in ImageListBox.cs in YAF.Controls project[/b] [code] public string ImageLocation { get { string imageLocation = ViewState["ListBoxImageLocation"] as string; return string.IsNullOrWhiteSpace(imageLocation) ? string.Empty : imageLocation; } set { ViewState["ListBoxImageLocation"] = value; } } [/code]
Posted by: vcsharp - Friday, 24 November 2017 15:46:30
I was able to resolve this issue. All that was needed was to set the property [i]ImageLocation[/i] 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.[b] I have tested and tried this code.[/b] [code]

Posted by: tha_watcha - Sunday, 26 November 2017 08:21:20
Thanks issue will be fixed in the next release.