从服务器端生成的弹出窗口 [英] Popup Window generated from Server Side

查看:67
本文介绍了从服务器端生成的弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从

ASP.Net代码隐藏生成非模态弹出窗口。我尝试使用客户端

脚本,如function Test(){

window.open(''test.htm'',_ blank,

''height = 200,width = 400,status = no,toolbar = no,

menubar = no,location = no resizable = no

scrollable = no '');

但我似乎无法在服务器端表单中调用

的客户端脚本。我知道我可以使用上下文

与Response.redirect或Server.transfer返回一个

不同的页面,但无法确定如何生成一个弹出窗口

关于页面的窗口或联系人页面页面。

解决方案



" HarveyB" <公顷***** @ compass-soft.com>在消息中写道

news:01 **************************** @ phx.gbl ... < blockquote class =post_quotes>我想从ASP.Net代码隐藏生成非模态弹出窗口。




如何使用Response。写在你的服务器端代码:


Response.Write("< script language =''javascript''> window.open(....)< / script> ;");


---

Steven Wood


-----原始消息-----

HarveyB <公顷***** @ compass-soft.com>在消息中写道
新闻:01 **************************** @ phx.gbl ...

我想从ASP.Net代码隐藏生成非模态弹出窗口。
如何在服务器端代码中使用Response.Write:

响应.Write(" script language =''javascript''> window.open



(....)< / script>");
---
Steven Wood



我认为不能解决问题。它将在返回的页面上放置一个

脚本,但是如何从服务器端调用脚本

。这里的问题是从服务器端打开一个弹出窗口

窗口。 ''Window''是客户端

对象。


Harvey Bernstein


你好HarveyB,


的客户端窗口。

出于安全考虑,从服务器端打开一个窗口是不安全的。

我是否回答了你的问题?


问候,

Peter Huang

Microsoft在线合作伙伴支持

安全! www.microsoft.com/security

此帖子是提供按原样没有保证,也没有赋予任何权利。


--------------------

内容 - 分类:urn:content-classes:message
From:" HarveyB" < ha ***** @ compass-soft.com>
发件人:HarveyB < ha ***** @ compass-soft.com>
参考文献:< 01 ************************** **@phx.gbl>
< uK ************* @ TK2MSFTNGP12.phx.gbl>主题:Re:从服务器端生成的弹出窗口
日期:2003年9月10日星期三17: 50:25 -0700
行数:23
消息ID:< 02 *************************** *@phx.gbl>
MIME-Version:1.0
Content-Type:text / plain;
charset =" iso-8859-1"
Content-Transfer-Encoding :7bit
X-Newsreader:用于Windows 2000的Microsoft CDO
线程索引:AcN3 / rAw3yfjfbmGRFOdbtTXl0V14A ==
X-MimeOLE:由Microsoft MimeOLE制作V5.50.4910.0300
新闻组:microsoft.public.dotnet.general
路径:cpmsftngxa06.phx.gbl
外部参照:cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108058
NNTP-Posting-Host:TK2MSFTNGXA13 10.40.1.165
X-Tomcat-NG:microsoft.public.dotnet.general

-----原始消息-----

HarveyB <公顷***** @ compass-soft.com>在消息中写道
新闻:01 **************************** @ phx.gbl ...

我想从ASP.Net代码隐藏生成非模态弹出窗口。



如何在服务器端代码中使用Response.Write:<响应。写(<< script language =''javascript''> window.open


(....)< / script>") ;


---
Steven Wood


我认为这不能解决问题。它将在返回的页面上放置一个
脚本,但是如何从服务器端调用脚本。这里的问题是从服务器端打开一个弹出窗口。 ''Window''是客户端的对象。

Harvey Bernstein




I would like to generate non-modal popup windows from
ASP.Net code-behind. I have tried using Client Side
scripting like "function Test(){
window.open(''test.htm'',_blank,
''height=200,width=400,status=no,toolbar=no,
menubar=no,location=no resizable=no
scrollable=no'');
but I can''t seem to invoke the client side script from
within a Server Side Form. I know I can use the context
with to Response.redirect or Server.transfer to return a
different page, but can''t figure how generate a pop-up
window for an ''About'' page or a "Contacts" page.

解决方案


"HarveyB" <ha*****@compass-soft.com> wrote in message
news:01****************************@phx.gbl...

I would like to generate non-modal popup windows from
ASP.Net code-behind.



How about using Response.Write in your server side code:

Response.Write("<script language=''javascript''>window.open(....)</script>");

---
Steven Wood


-----Original Message-----

"HarveyB" <ha*****@compass-soft.com> wrote in message
news:01****************************@phx.gbl...

I would like to generate non-modal popup windows from
ASP.Net code-behind.
How about using Response.Write in your server side code:

Response.Write("<script language=''javascript''>window.open


(....)</script>");
---
Steven Wood


I don''t think that solves the problem. It will place a
script on the returned page, but how is the script invoked
from the Server Side. The issue here is to open a pop-up
window from the server side. ''Window'' is a client-side
object.

Harvey Bernstein


Hi HarveyB,

I do not believe that there is a method to open a client window without
using the client script.
For security concern, it is non-security to open a window from server-side.
Did I answer your question?

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------

Content-Class: urn:content-classes:message
From: "HarveyB" <ha*****@compass-soft.com>
Sender: "HarveyB" <ha*****@compass-soft.com>
References: <01****************************@phx.gbl> <uK*************@TK2MSFTNGP12.phx.gbl>Subject: Re: Popup Window generated from Server Side
Date: Wed, 10 Sep 2003 17:50:25 -0700
Lines: 23
Message-ID: <02****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcN3/rAw3yfjfbmGRFOdbtTXl0V14A==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:108058
NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
X-Tomcat-NG: microsoft.public.dotnet.general

-----Original Message-----

"HarveyB" <ha*****@compass-soft.com> wrote in message
news:01****************************@phx.gbl...

I would like to generate non-modal popup windows from
ASP.Net code-behind.



How about using Response.Write in your server side code:

Response.Write("<script language=''javascript''>window.open


(....)</script>");


---
Steven Wood


I don''t think that solves the problem. It will place a
script on the returned page, but how is the script invoked
from the Server Side. The issue here is to open a pop-up
window from the server side. ''Window'' is a client-side
object.

Harvey Bernstein




这篇关于从服务器端生成的弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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