日期:2014-05-19  浏览次数:20849 次

为什么跳转不了呢?
webform下   左右分栏,左边是按钮


右边是跳转页

预先创建了一个空白页
                          <td   rowspan= "2 ">
                                        <iframe   width= "80% "   style= "height:   471px "   id= "temweb "   runat= "server "> </iframe>
                          </td>


我想要的功能是   点左边,按钮链接,   右边的temweb显示webb.aspx   的内容
                protected   void   Button1_Click1(object   sender,   EventArgs   e)
                {
                        this.temweb.ResolveUrl( "webb.aspx ");
                     
                       
                               
                       
                }

代码错了??

------解决方案--------------------
直接

<asp:HyperLink ID= "HyperLink3 " runat= "server " NavigateUrl= "链接地址 "
Target= "newscenter "> 链接文字 </asp:HyperLink>


就可以了
------解决方案--------------------
其实可以用链接的,你一定要用按钮的话,可以用html按钮

然后这样

<input id= "Button1 " type= "button " value= "button " onclick= "temweb.location.href= 'webb.aspx ' " />

<input id= "Button2 " type= "button " value= "button " onclick= "temweb.location.href= 'webc.aspx ' " />

<input id= "Button3 " type= "button " value= "button " onclick= "temweb.location.href= 'webd.aspx ' " />
...
...