Note that there are some explanatory texts on larger screens.

plurals
  1. POWeb app works in Firefox but not IE8
    text
    copied!<p>I've built this app that displays employee photos stored in several sharepoint folders. It also displays the employee name extracted from the file name and a previous and next button to move through the photos.</p> <p>The markup is surrounded by an update panel to prevent the entire page from reloading when you click to view the next photo.</p> <p>The app is working fine in firefox, but the images do not display in IE8. Can anyone tell what is causing this?</p> <pre><code>public List&lt;string&gt; photoFileList = new List&lt;string&gt;(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Session["index"] = 0; Session["CountOfPictures"] = 0; List&lt;string&gt; PhotoFolders = new List&lt;string&gt;(); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\Dept1"); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\ Dept2"); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\ Dept3"); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\ Dept4"); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\ Dept5”); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\ Dept6"); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\ Dept7"); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\ Dept8"); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\ Dept9"); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\ Dept10"); PhotoFolders.Add("\\\\intranet.org\\Photo Album\\Employees\\ Dept11"); Session["AllPhotoFolders"] = PhotoFolders; List&lt;string&gt; AllPhotoFolders = (List&lt;string&gt;)Session["AllPhotoFolders"]; foreach (string folder in AllPhotoFolders) { DirSearch(folder); } Session["AllPhotoFiles"] = photoFileList; Image1.ImageUrl = photoFileList[0].Replace("\\", "//"); var list = (List&lt;string&gt;)Session["AllPhotoFiles"]; lblName.Text = System.IO.Path.GetFileName(list[0]).Substring(0, System.IO.Path.GetFileName(list[0]).Length - 4).Replace("_", " "); Session["CountOfPictures"] = photoFileList.Count; } } void DirSearch(string sDir) { foreach (string f in Directory.GetFiles(sDir, "*.JPG")) { //BulletedList1.Items.Add(f); photoFileList.Add(f); } foreach (string d in Directory.GetDirectories(sDir)) { if (!d.EndsWith("_t") &amp;&amp; !d.EndsWith("_w")) { DirSearch(d);} } } protected void btnNext_Click(object sender, EventArgs e) { int NextIndex = (int)Session["index"]; int PictureCount = (int)Session["CountOfPictures"]; NextIndex += 1; if (NextIndex == PictureCount) { NextIndex = 0; } Session["index"] = NextIndex; var list = (List&lt;string&gt;)Session["AllPhotoFiles"]; Image1.ImageUrl = list[NextIndex].Replace("\\", "//"); lblName.Text = System.IO.Path.GetFileName(list[NextIndex]).Substring(0,System.IO.Path.GetFileName(list[NextIndex]).Length - 4).Replace("_"," "); lblName.Visible = true; } protected void btnPrevious_Click(object sender, EventArgs e) { int NextIndex = (int)Session["index"]; int PictureCount = (int)Session["CountOfPictures"]; NextIndex -= 1; if (NextIndex == -1) { NextIndex = PictureCount - 1; } Session["index"] = NextIndex; var list = (List&lt;string&gt;)Session["AllPhotoFiles"]; Image1.ImageUrl = list[NextIndex].Replace("\\", "//"); lblName.Text = System.IO.Path.GetFileName(list[NextIndex]).Substring(0, System.IO.Path.GetFileName(list[NextIndex]).Length - 4).Replace("_", " "); lblName.Visible = true; } &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server"&gt; &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt; &lt;/asp:ScriptManager&gt; &lt;br /&gt;&lt;br /&gt; &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt; &lt;ContentTemplate&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt;&lt;asp:Image ID="Image1" runat="server" Height="400px" Width="400px" /&gt;&lt;/td&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;td&gt;&lt;asp:Label ID="lblName" runat="server" Text="Label" Font-Size="X-Large"&gt;&lt;/asp:Label&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr &gt; &lt;td&gt; &lt;div style="text-align:center"&gt; &lt;asp:Button style="text-align:center" ID="btnPrevious" runat="server" Text="Previous" onclick="btnPrevious_Click" Width="125px" /&gt; &lt;asp:Button style="text-align:center" ID="btnNext" runat="server" Text="Next" onclick="btnNext_Click" Width="125px" /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/table&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; &lt;/asp:Content&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload