设置Textmode =" password"时TextBox textmode属性不起作用在Gridview Edititemtemplate中 [英] TextBox textmode property is not working when sets Textmode="password" in side Gridview Edititemtemplate
问题描述
我有一个gridview,我在uneditabel中显示客户名,用户名,密码值,
(最初)我在标签中显示所有columans值我在网格视图的Rowdatabound事件中将密码值转换为***。
每当我们点击编辑按钮时,应显示用户名和密码在Textbox中,我设置了一个文本框的Textmode =password,其中显示了密码。
请参阅下面的代码:
Hi,
I have a gridview in that i am displaying Customername,Username,Password values,
in uneditabel(in initial) i diaplayed all columans values in lable here i converted password value as *** in Rowdatabound event of gridview.
Whenever we clicks edit button username and password should be displayed in Textbox`s so that i sets Textmode="password" of a Textbox in which password display.
see the code below:
<ItemTemplate>
<asp:Label ID ="lblPassword" runat ="server" Text ='<%#Eval("Password")%>'></asp:Label></ItemTemplate>
<EditItemTemplate ><asp:TextBox ID ="txtPassword" runat ="server" Text ='<%#Eval("Password")%>' TextMode ="Password"></asp:TextBox></EditItemTemplate>
但是密码列中的文本框正在显示空的。
请任何人帮我解决这个问题。
谢谢
Uday
but Textbox in password column is displaying as empty.
Plese any body help me to solve this problem.
Thanks
Uday
推荐答案
在编辑密码字段时在网格的RowDataBound上显示密码
Show Password On RowDataBound of Grid while Edit Password Field
这篇关于设置Textmode =" password"时TextBox textmode属性不起作用在Gridview Edititemtemplate中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!