如何启动按钮后点击另一个ASPX页面? [英] How to launch another aspx web page upon button click?

查看:160
本文介绍了如何启动按钮后点击另一个ASPX页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp.net应用程序,用户可以点击一个按钮,启动另一个页面(在同一应用程序内)。我现在面临的问题是,原来的页面,并新推出的网页都应该推出。

I have an asp.net application, where the user would click a button and launch another page (within the same application). The issue I am facing is that the original page and the newly launched page should both be launched.

我试过的Response.Redirect,但往往卸载原来的页面。

I tried response.redirect, but that tends to unload the original page.

有什么建议?

推荐答案

此按钮后到当前页面,而在同一时间打开 OtherPage.aspx 在一个新的浏览器窗口。我觉得这是你的意思 ...原始页面和新推出的网页都应该推出什么。

This button post to the current page while at the same time opens OtherPage.aspx in a new browser window. I think this is what you mean with ...the original page and the newly launched page should both be launched.

<asp:Button ID="myBtn" runat="server" Text="Click me" 
     onclick="myBtn_Click" OnClientClick="window.open('OtherPage.aspx', 'OtherPage');" />

这篇关于如何启动按钮后点击另一个ASPX页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆