Note that there are some explanatory texts on larger screens.

plurals
  1. PORSS is not working in google chrome using asp.net 3.5
    primarykey
    data
    text
    <p>I have implemented the code for RSS in asp.net 3.5. I can see the RSS feed in my application in Firefox.</p> <p>But I couldn't manage to load the RSS feed in Google chrome browser. It only shows the XML which I had written in my code. </p> <p>How can I make my code Browser independent?</p> <pre><code>&lt;rss version="2.0"&gt; &lt;channel&gt; &lt;title&gt;Demo Site&lt;/title&gt; &lt;link&gt;http://www.ABC.com&lt;/link&gt; &lt;asp:repeater id="rptRss" runat="server"&gt; &lt;ItemTemplate&gt; &lt;item&gt; &lt;% if (Global.SessionData.Language == Convert.ToInt16(Global.GlobalCls.Language.Arabic)) {%&gt; &lt;title&gt; &lt;%# RemoveIllegalCharacters(DataBinder.Eval(Container.DataItem, "TitleAr"))%&gt;&lt;/title&gt; &lt;description&gt;&lt;%# RemoveIllegalCharacters(DataBinder.Eval(Container.DataItem, "DescriptionAr"))%&gt;&lt;/description&gt; &lt;%} else {%&gt; &lt;title&gt; &lt;%# RemoveIllegalCharacters(DataBinder.Eval(Container.DataItem, "Title"))%&gt;&lt;/title&gt; &lt;description&gt;&lt;%# RemoveIllegalCharacters(DataBinder.Eval(Container.DataItem, "Description"))%&gt;&lt;/description&gt; &lt;%}%&gt; &lt;/item&gt; &lt;/ItemTemplate&gt; &lt;/asp:repeater&gt; &lt;/channel&gt; &lt;/rss&gt; </code></pre> <p>Here is my code behind. I have just bind the repeater and call this function to remove illegal characters.</p> <pre><code>protected string RemoveIllegalCharacters(object input) { // cast the input to a string string data = input.ToString(); Cache.Remove("TitleAr"); Cache.Remove("DescriptionAr"); Cache.Remove("Title"); Cache.Remove("Description"); // replace illegal characters in XML documents with their entity references data = data.Replace("&amp;", "&amp;amp;"); data = data.Replace("\"", "&amp;quot;"); data = data.Replace("'", "&amp;apos;"); data = data.Replace("&lt;", "&amp;lt;"); data = data.Replace("&gt;", "&amp;gt;"); return data; } </code></pre> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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