请教关于linkbutton点击后弹出新窗口的代码(传参数)!谢谢。

mshuk 2005-10-18 10:58:15
同上。
...全文
314 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
LinDaXX 2006-04-12
  • 打赏
  • 举报
回复

不错
jimu8130 2005-10-23
  • 打赏
  • 举报
回复
这个事件你来datagrid的itemdatabound事件里面写
你可以参考lovecherry的博客
luyesql 2005-10-23
  • 打赏
  • 举报
回复
帮顶
dqwzh 2005-10-23
  • 打赏
  • 举报
回复
如果LinkButton在datagrid里面
<asp:TemplateColumn>
<itemtemplate>
<asp:LinkButton></asp:LinkButton>
<itemtemplate>
<asp:TemplateColumn>

那么LinkButton1.Attributes.Add("onclick","PopWindow("+para1+","+para2+")");应该在什么事件里面呢?
mathsword 2005-10-18
  • 打赏
  • 举报
回复
LinkButton1.Attributes.Add("onclick","PopWindow("+para1+","+para2+")");

传参数的:
function PopWindow(para1,para2) {
var intWidth = 640;
var intHeight = 480;
var intScreenX = (screen.availWidth - intWidth) / 2;
var intScreenY = (screen.availHeight - intHeight) / 2;
var win = open("xxxx.aspx?para1=" + escape(para1) +"¶2=" + escape(para2), "", "width=" + intWidth + ", height=" + intHeight + ",top="+ intScreenY +",left="+ intScreenX +", location=no, menubar=no, scrollbars=yes, toolbar=no");
}
豌豆干 2005-10-18
  • 打赏
  • 举报
回复
服务器
private void Page_Load(object sender, System.EventArgs e)
{
LinkButton1.Attributes.Add("onclick","openmessagewin()");
}

客户端:
<script>
function openmessagewin() {  
 window.open ("MESSAGE/ShowMessage.aspx", "信息窗口", "height=200, width=500, toolbar =no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no")
 }
</script>
mshuk 2005-10-18
  • 打赏
  • 举报
回复
ding

62,068

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

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