在新窗口中打开 [英] Open in new window

查看:97
本文介绍了在新窗口中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.Net页面,它将Response.Redirect执行到代码创建的URL。

有没有办法对重定向进行编码以打开一个类似于

Javascript window.open()?谢谢。


David

解决方案

没有。必须通过javascript或点击锚点(带目标)来完成。


- 布鲁斯(sqlwork.com)


David C写道:


我有一个ASP.Net页面,它对一个代码创建的URL做了一个Response.Redirect。

有没有办法编码重定向打开一个类似于

Javascript window.open()的新窗口?谢谢。


David


沿着这些方向:


我想要一个按钮,当点击时打开一个新窗口并加载一个

特定页面。我尝试了很多东西,但都没有用:


1 - 带有超链接控件的按钮环绕,没有文字和

thehyperlink。

2 - 放入onclick = http:// yada

3 - 放入onclick =" javascript :Window.Open(yada,''_ blank'') ;"

4 - 在Page_Load中放入myButton.Attributes.Add(" OnClick",

" Window.Open(''yada'',' '_blank'')")

....可能还有一些尝试。


没有任何效果。任何人的想法?


雪莉


P.S.为什么他们只是在

导航和目标规范的按钮控件中只有属性?是的,他们在超链接控件中有一个

图像的空间,但这意味着当已经有按钮设计时我们必须有一个按钮的

图像默认情况下。

" bruce barker" < no **** @ nospam.comwrote in message

news:Oq ************** @ TK2MSFTNGP06.phx.gbl ...


no。必须通过javascript或点击锚点(带目标)来完成。


- 布鲁斯(sqlwork.com)


David C写道:


>我有一个ASP.Net页面,它执行Response.Redirect到代码创建的网址。有没有办法编写重定向来打开一个类似于Javascript window.open()的新窗口?谢谢。

David



" Shelly" < sh ************ @ asap-consult.comwrote in message

news:13 ************* @ corp。 supernews.com ...


没有任何效果。任何人的想法?



< input type =" button"值= QUOT;最新及QUOT; onclick =" window.open

(''http://www.javascript-coder.com/window-popup/javascript-window-open.phtml'',''mywindow'') ;"

/>

-

Mark Rae

ASP.NET MVP
http://www.markrae.net


I have an ASP.Net page that does a Response.Redirect to a code-created url.
Is there any way to code the redirect to open a new window similar to the
Javascript window.open() ? Thanks.

David

解决方案

no. it must be done via javascript or clicking an anchor (with a target).

-- bruce (sqlwork.com)

David C wrote:

I have an ASP.Net page that does a Response.Redirect to a code-created url.
Is there any way to code the redirect to open a new window similar to the
Javascript window.open() ? Thanks.

David


Along these lines:

I want to have a button that when clicked opens a new window and loads a
specific page. I tried many things, but none worked:

1 - Surround the button with a hyperlink control and no text with
thehyperlink.
2 - put in onclick=http://yada
3 - put in onclick="javascript:Window.Open(yada, ''_blank'');"
4 - in the Page_Load put in myButton.Attributes.Add("OnClick",
"Window.Open(''yada'', ''_blank'')")
....and probably some more attempts.

Nothing worked. Any ideas anyone?

Shelly

P.S. Why didn''t they simply have attributes in the button control for the
navigation and the target specification? Yes, they have a space for an
image in the hyperlink control, but that means we would have to have the
image of a button when there is already a button design by default.
"bruce barker" <no****@nospam.comwrote in message
news:Oq**************@TK2MSFTNGP06.phx.gbl...

no. it must be done via javascript or clicking an anchor (with a target).

-- bruce (sqlwork.com)

David C wrote:

>I have an ASP.Net page that does a Response.Redirect to a code-created
url. Is there any way to code the redirect to open a new window similar
to the Javascript window.open() ? Thanks.

David



"Shelly" <sh************@asap-consult.comwrote in message
news:13*************@corp.supernews.com...

Nothing worked. Any ideas anyone?

<input type="button" value="New" onclick="window.open
(''http://www.javascript-coder.com/window-popup/javascript-window-open.phtml'',''mywindow'');"
/>
--
Mark Rae
ASP.NET MVP
http://www.markrae.net


这篇关于在新窗口中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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