点击按钮,如果打开新的页面?

fangbuge 2004-09-01 02:33:47
点击按钮,如果打开新的页面?
1、不使用JAVASCRIPT代码,直接使用VB代码怎么写?
2、如何打开有模式的页面?
...全文
395 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
lhfzd2004 2004-09-01
  • 打赏
  • 举报
回复
function openwin()
{ window.open ("page.html", "newwindow", "height=100, width=400, toolbar=
no, menubar=no, scrollbars=no, resizable=no, location=no, status=no") }

按钮调用:
<input type="button" onclick="openwin()" value="打开窗口">
晨晨 2004-09-01
  • 打赏
  • 举报
回复
在codebehind中写以下语句
sub button1_click(byval sender as object,byval e as clickeventargs)
....
response.redirect("要打开的网页的相对跟径")
....
end sub
jasonlee0927 2004-09-01
  • 打赏
  • 举报
回复
button.attributes.add("onclick","javascript:window.open('a.aspx','','toolbar=0,'status=0,menubar=0');")
guxiangdefeng 2004-09-01
  • 打赏
  • 举报
回复
openWindow = "<script>window.open('../sk002/sk002.aspx','','toolbar=0, " _
& " location=0,directories=0,status=0,menubar=0,scrollbars=0, " _
& " resizable=1,left=150,top=60,width=700,height=500'); </script>"

RegisterClientScriptBlock("addRecodeWindow", openWindow)
pingnt 2004-09-01
  • 打赏
  • 举报
回复
<a href="abc.aspx" target=_blank>abc</a>
zhushizu 2004-09-01
  • 打赏
  • 举报
回复
这个问题对我这个菜鸟级的人来说还是难了一点点,不过还是要帮楼主顶一下...因为菜鸟也想知道答案....关注中!
fangbuge 2004-09-01
  • 打赏
  • 举报
回复
难道只能用JS啊?
liuyong_lll 2004-09-01
  • 打赏
  • 举报
回复
1.打开新窗口,为什么不用JS??

2.string strScript = "<script>" ;
strScript += "function OpenWin(){" ;
strScript += "var str=window.showModalDialog('ModalForm2.aspx',document.Form1.TextBox1.value);" ;
strScript += "if(str!=null) document.Form1.TextBox1.value=str;" ;
strScript += "}" ;
strScript += "</script>" ;
RegisterClientScriptBlock("clientScript", strScript);

还是JS的
jerrycool 2004-09-01
  • 打赏
  • 举报
回复
不用javascript???帮你顶。
liuyong_lll 2004-09-01
  • 打赏
  • 举报
回复
1.打开新窗口,为什么不用JS??

2.string strScript = "<script>" ;
strScript += "function OpenWin(){" ;
strScript += "var str=window.showModalDialog('ModalForm2.aspx',document.Form1.TextBox1.value);" ;
strScript += "if(str!=null) document.Form1.TextBox1.value=str;" ;
strScript += "}" ;
strScript += "</script>" ;
RegisterClientScriptBlock("clientScript", strScript);

还是JS的
Eddie005 2004-09-01
  • 打赏
  • 举报
回复
只能用脚本

62,072

社区成员

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

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

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

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