如何防止文本框中的文本在HTML中呈现。 [英] How to prevent text in textbox from rendering in HTML.

查看:85
本文介绍了如何防止文本框中的文本在HTML中呈现。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,

在webform中,我有一个文本框。当我们查看视图源时(右键单击网页 - >查看源代码),不应在渲染的html中看到文本框中的文本。

有没有办法实现这个目标?

任何帮助表示赞赏。



谢谢,

Lok。

Hi Team,
In a webform, I have a textbox. The text in a textbox should not be seen in the rendered html when we go for view source (right click on webpage -> View source).
Is there any way to achieve this?
Any help appreciated.

Thanks,
Lok.

推荐答案

在ASP.NET中,任何在服务器端将Visible设置为false的控件都不会呈现给客户端...
In ASP.NET any control that has Visible set to false at the server side will not render to the client at all...


如果控件可见性设置为true,则将其设置为true未关闭或将其视图状态属性设置为关闭。
Set your control visibility to true if it is not or set its view state property off.


这篇关于如何防止文本框中的文本在HTML中呈现。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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