你的aspx里面的代码,设置了焦点,把<body  内的onload=...去掉就可以了

解决方案 »

  1.   

    你如果用<div> or <span> 是肯定会被DropDownlist遮挡了
    建议你用iframe,可以遮挡DropDownlist
      

  2.   

    <%@ Register TagPrefix="Tree" TagName="ShowTree" Src="../../public/Ctree.ascx" %>
    <asp:linkbutton id="LinkButton3" runat="server">选择...</asp:linkbutton><body>没设置属性
    点击选择时 调 Ctree.ascx 呀,该文件被 DropDownList 遮挡了。
      

  3.   

    动态输出iframe:
       
          var ShowPack=null
      function ShowPackageData()
      {
        var tmpstr="<style>"
            tmpstr+="BODY  { FONT-SIZE: 8pt; SCROLLBAR-HIGHLIGHT-COLOR: buttonface; SCROLLBAR-SHADOW-COLOR: buttonface; COLOR: #333333; SCROLLBAR-3DLIGHT-COLOR: buttonhighlight; SCROLLBAR-TRACK-COLOR: #eeeeee; SCROLLBAR-DARKSHADOW-COLOR: buttonshadow }" 
            tmpstr+="</style>"
            tmpstr+="<body onload='window.resizeTo(document.all.adiv.offsetWidth+1,document.all.adiv.offsetHeight+1)' topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>"
            tmpstr+="<div id=adiv class=font8 style='border-width:1px;border-style:solid;border-color:black; width:138px; height:40px; z-index:1; background-color: #FFFFCC; layer-background-color: #FFFFCC;'>"
            tmpstr+="No.of packages: " + document.all.Form1.PackageNO.value+"<br>";
    tmpstr+="Package No: " + document.all.Form1.PackageNoDetail.value;
    tmpstr+="</div>"
            tmpstr+="</body>"
         
         if(ShowPack)ShowPack.removeNode(true);   
            ShowPack = document.createElement("iframe");
    ShowPack.id="fram";
    ShowPack.frameBorder=0;
    ShowPack.style.position="absolute";


    var XX=event.clientX+document.body.scrollLeft;
    var YY=event.clientY+document.body.scrollTop;

    ShowPack.style.top = YY;
    ShowPack.style.left = XX;

            if((parseInt(ShowPack.style.left) + 50)>parseInt(document.body.clientWidth)) ShowPack.style.left = parseInt(document.body.clientWidth)-50-5
              document.body.insertAdjacentElement("beforeEnd",ShowPack);

    window.frames.fram.document.open();
    window.frames.fram.document.writeln(tmpstr);
    window.frames.fram.document.close();
     
      }
      

  4.   

    点击调用<script>window.open();</script>打开一个新窗口,这个新窗口里再调用ascx控件啊
      

  5.   

    是弹出窗口引用user control的问题