求教一个ASP框架集刷新的问题

qingyou123ok 2012-08-27 11:40:49
主页面:<
frameset cols ="20%,80%">
<frame name="left" id="left" src="left.aspx">
<frame name="I3" id="I3" src="eastmarking.aspx">
</frameset>
想要实现点击 left页面的数据 刷新 I3页面的数据,求各位大师们指教,或者有什么好用的方法指教一二,拜谢
left页面:前台
JS

<script type="text/javascript">
function show_example() {
//window.parent.document.getElementById("I3").src="eastmarking.aspx";
window.parent.frames["I3"].location.reload();
</script>

数据控件
<asp:ListView ID="LV_Menu" runat="server" ItemContainerID= "ItemPlaceHolder"
onitemcommand="LV_Menu_ItemCommand"
onselectedindexchanged="LV_Menu_SelectedIndexChanged"
>
<LayoutTemplate>
<table border="2">
<tbody>
<asp:PlaceHolder runat ="server" ID="ItemPlaceHolder"></asp:PlaceHolder>
</tbody>
</table>
</LayoutTemplate>

<ItemTemplate>

<tr>
<td id='submenu2'>
<asp:LinkButton ID="LB" runat="server" Text='<%# Eval("地区")%>'/>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
后台:
protected void LV_Menu_ItemCommand(object sender, ListViewCommandEventArgs e)
{
ListViewDataItem dataItem = (ListViewDataItem)e.Item;
LinkButton Mylikebutton;
Mylikebutton = (LinkButton)e.Item.FindControl("LB");
//string strUrl = "eastmarking.aspx?UserName=" + Mylikebutton.Text.Trim();
//Response.Redirect(strUrl);
//Server.Transfer(strUrl,true);
Session["UserName"] = Mylikebutton.Text.Trim();
Page.ClientScript.RegisterStartupScript(this.GetType(), "text", "function show_example()", true);
}
I3页面:后台
protected void Page_Load(object sender, EventArgs e)
{
string area ;


if (!Page.IsPostBack)
{
area = "上海";
}
else
{
area = Session["UserName"].ToString();
}
BindGrid1(area);
}
...全文
99 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
qingyou123ok 2012-08-27
  • 打赏
  • 举报
回复
现在的问题是点击left页面 I3页面的数据部会更新了
求指教

87,992

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧