Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. hyperlink in datalist opening in new window even in target set to parent

hyperlink in datalist opening in new window even in target set to parent

Scheduled Pinned Locked Moved ASP.NET
questionsysadmindocker
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Meax
    wrote on last edited by
    #1

    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?

    A 1 Reply Last reply
    0
    • M Meax

      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?

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups