两个iframe并排在一个html里,iframe A里是一个.aspx页面,里面有一个linkbutton。我想点击后,iframe B加载进一个指定的.aspx网页。怎么做啊?我第一次接触,代码以及代码放在哪里,详细点,多谢了。

解决方案 »

  1.   

    用javascript脚本,脚本提交写好,linkbutton.Attributes["onclick"]="javascript:functionname()"
      

  2.   

    <script language="javascript">
      function linkbutton_click()
      {
        iframe2.location="other.aspx";
      }在页面中linkbutto属性中加入:
    OnClick="linkbutton_click();"
      

  3.   

    同意楼上的。给A中的LinkButton添加一个Onclick()事件.
    parent.document.all("iframeB").src = "g.aspx"
      

  4.   

    Page_load()
    {
       linkbutton.Attributes["onclick"] = "parent.frame2.location.href = 'ddd.aspx';";
    }
      

  5.   

    大哥哥们,我对javascript一点都不知。能不能告诉我代码都放哪呀?
      

  6.   

    to kkeemmgg(kkeemmgg) 
    您的script模块放在哪呀?
      

  7.   

    to cnhgj(戲子)(我想养只沙皮狗) 
    你的代码放哪呀?
      

  8.   

    对不起阿 借用代码了
    Page_load()
    {
       linkbutton.Attributes["onclick"] = "parent.frame2.location.href = 'ddd.aspx';";
    }
    放在你的后端代码中,即
    private void Page_Load(object sender, System.EventArgs e){}
    这个函数中
      

  9.   

    说错了
    就这样写吧:
    private void Page_Load(object sender, System.EventArgs e){
    {
       linkbutton.Attributes["onclick"] = "javascript:parent.frame2.location.href = 'ddd.aspx';";
    }
      

  10.   

    to:vivi8233(吐司)
    出错,说33行缺少“;”。可33行是空呀。求救。
      

  11.   

    根本不用这么麻烦。你在LINKBUTTON的CLICK事件里面把下面的代码copy进去!~YourIframeID.Attributes["src"]="yourpage.aspx";就万事大吉了。结贴吧。