0

I have a asp.net project and Im trying to link a button to new child window but I am getting this error message "content controls have to be top-level controls in a content page or a nested master page that references a master page."

aspx code;

    <a href="#" onClick="javascript:window.open('BelgeKayit.aspx','BelgeKayit','height=400,width=400'); return false;" target="_blank">
     <asp:ImageButton ID="imgBelgeEkle" runat="server" ImageUrl="~/images/BelgeEkle1.png"  PostBackUrl='<%#Eval("ID","~/Modul/BelgeKayit.aspx?Id={0}")%>' ToolTip="Belge Ekle" AlternateText="Belge Ekle" CommandArgument='<%#Eval("ID")%>' Width="25" Height="25" />
     </a>  
amadeus
  • 39
  • 2
  • 11

1 Answers1

0

try this

Remove return false

<a href="#" onClick="javascript:window.open('BelgeKayit.aspx','BelgeKayit','height=400,width=400');" target="_blank">
Dgan
  • 10,077
  • 1
  • 29
  • 51
  • I already tryed that, and when ı do that ı also lose the main page which ı want it to run after opening the child page. – amadeus Dec 19 '14 at 08:46
  • @amadeus you can use FireBug for Debugging – Dgan Dec 19 '14 at 08:49
  • I couldnt find anything, I used firebug and it looked okey @Ganesh_Devlekar – amadeus Dec 19 '14 at 09:13
  • @amadeus just paste this in your browser `javascript:window.open('https://www.google.co.in','ganesh','height=400,width=400');` this works for me – Dgan Dec 19 '14 at 09:26
  • that also works for me, maybe the problem is about the aspx file Im trying to open with href. But what could be the problem?? @Ganesh_Devlekar – amadeus Dec 19 '14 at 09:31
  • @amadeus can you post rendered html in your browser for that anchor?? – Dgan Dec 19 '14 at 09:32
  • no ı cant open that file alone either. ı think that file is the problem @Ganesh_Devlekar – amadeus Dec 19 '14 at 09:51