如何使用window.open()只读/禁用页面(内容)在新选项卡中打开页面 [英] How to open a page in new tab with readonly/disable the page(content) using window.open()

查看:309
本文介绍了如何使用window.open()只读/禁用页面(内容)在新选项卡中打开页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai

在这里,我在新窗口中打开一个页面。它工作正常,但页面内容是可编辑模式,我想打开页面只是为了显示数据不可编辑。所以,为此我怎么能把它放在只读或禁用模式。这是我的代码,



请帮帮我







string str = HttpRuntime.AppDomainAppVirtualPath;

string path = Page.Request.Url.ToString();

string url = Page.Request.Url .GetLeftPart(UriPartial.Authority)+ str +/ ApplicationMgmt / NewRegistration.aspx;

StringBuilder sb = new StringBuilder();

sb.Append(window。 open(');

sb.Append(url);

sb.Append('););

ScriptManager。 RegisterClientScriptBlock(this,typeof(Page),Registration,sb.ToString(),true);

Hai
Here, i open a page in new window. its working fine but page content is editable mode, i want to open page just for showing data not editable. so, for that how can i put it in readonly or disable mode. This is my code,

Please help me



string str = HttpRuntime.AppDomainAppVirtualPath;
string path = Page.Request.Url.ToString();
string url = Page.Request.Url.GetLeftPart(UriPartial.Authority) + str + "/ApplicationMgmt/NewRegistration.aspx";
StringBuilder sb = new StringBuilder();
sb.Append("window.open('");
sb.Append(url);
sb.Append("');");
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "Registration", sb.ToString(),true);

推荐答案

试试这个Link


Hi
在你的注册页面你好在设计时禁用所有控件,然后使用window打开。打开你可以看到页面但不能在文本框中输入任何内容。如果你显示新的注册页面而没有可编辑的话,请尝试这样做isable所有控件运行时间和打开页面,如果需要注册该时间在运行时自动启用所有控件。

否则,如果你只想显示,只需显示标签中的所有数据。



我认为您使用NewRegistration页面作为注册详细信息,同一页面显示为显示页面的信息。如果您在分隔页面中显示信息或在标签中显示数据,请不要使用文本框
Hi In ur registration page u disable all control in design time,then it open using window.open u can see the page but cant type anything in the text box .Or try like this if u show new registration page without editable just disable all controls run time and open page,if need to register that time enable all control in run time itself.
Otherwise if u want show only,just show all data in labels.

I think u use NewRegistration page for register details and same page show as information showing page.If u show information in separat page or show in data in labels,dont use textbox


这篇关于如何使用window.open()只读/禁用页面(内容)在新选项卡中打开页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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