hyperlink in datalist opening in new window even in target set to parent
-
i have following datalist in WhatsNews.aspx page.
<asp:datalist id="DL1" runat="server" ItemStyle-BorderColor="#c7c7c6" CssClass="HomePageTitles"> <ItemTemplate> <asp:HyperLink Runat ="server" Target="_Parent" NavigateUrl ='<%#"page.aspx?id=" + DataBinder.Eval(Container.DataItem, "NewsArticleID").ToString()%>' ID="Hyperlink1"> <%#DataBinder.Eval(Container.DataItem, "NewsArticleTitle")%> </asp:HyperLink> </ItemTemplate> <AlternatingItemStyle BackColor="#FFFFFF" /> <ItemStyle BackColor="#e7e3e3" BorderColor="#e7e3e3" /> </asp:datalist>
in above code i am setting to open the links in parent window. and in home page i am adding WhatsNew.aspx using iframe.<iframe frameborder="0" marginheight="1" marginwidth="1" hspace="1" width="390" height="450px" scrolling="no" src="WhatsNew.aspx"></iframe>
when i open home page and click a link in whatsnew section, IE 8 opening the links in a new window. but firefox 3.5.7 opens in parant window, just like i want. how can i make IE 8 also open the links in parent window? -
i have following datalist in WhatsNews.aspx page.
<asp:datalist id="DL1" runat="server" ItemStyle-BorderColor="#c7c7c6" CssClass="HomePageTitles"> <ItemTemplate> <asp:HyperLink Runat ="server" Target="_Parent" NavigateUrl ='<%#"page.aspx?id=" + DataBinder.Eval(Container.DataItem, "NewsArticleID").ToString()%>' ID="Hyperlink1"> <%#DataBinder.Eval(Container.DataItem, "NewsArticleTitle")%> </asp:HyperLink> </ItemTemplate> <AlternatingItemStyle BackColor="#FFFFFF" /> <ItemStyle BackColor="#e7e3e3" BorderColor="#e7e3e3" /> </asp:datalist>
in above code i am setting to open the links in parent window. and in home page i am adding WhatsNew.aspx using iframe.<iframe frameborder="0" marginheight="1" marginwidth="1" hspace="1" width="390" height="450px" scrolling="no" src="WhatsNew.aspx"></iframe>
when i open home page and click a link in whatsnew section, IE 8 opening the links in a new window. but firefox 3.5.7 opens in parant window, just like i want. how can i make IE 8 also open the links in parent window?Target="_Parent" is not working in IE 8. This is the problem with you. Check this for solution : http://social.answers.microsoft.com/Forums/en-US/InternetExplorer/thread/635d4363-ca25-451e-8211-0265a25f115b[^] :)
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Windows7 API Code Pack
Simplify Code Using NDepend
Basics of Bing Search API using .NET