首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

为什么跳转不了呢?该怎么处理

2012-01-03 
为什么跳转不了呢?webform下左右分栏,左边是按钮右边是跳转页预先创建了一个空白页tdrowspan 2 ifra

为什么跳转不了呢?
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 ' " />
...
...

热点排行