473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Problem in displaying Password in the DataGrid Control

Hi all,
I have a datagrid and textboxes as columns. But when i say the textbox
property as PASSWORD the * (stars) does not display in the password text box
at runtime.
But when it is a normal textbox the text gets displayed in the control.

I will be happy if someone can answer this problem.
Thanks in advance

Raghavendra

Nov 18 '05 #1
2 1492
That's by design. The password textbox doesn't refill the value.

You can defeat the protection by adding the password as a "value" attribute.

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
TextBox1.Attributes.Add("value", "thePassword")
End Sub
<asp:textbox id="TextBox1" runat="server"
textmode="Password"></asp:textbox></p>

Ken
MVP [ASP.NET]
"Raghavendra V" <Ra**********@discussions.microsoft.com> wrote in message
news:18**********************************@microsof t.com...
Hi all,
I have a datagrid and textboxes as columns. But when i say the textbox
property as PASSWORD the * (stars) does not display in the password text
box
at runtime.
But when it is a normal textbox the text gets displayed in the control.

I will be happy if someone can answer this problem.
Thanks in advance

Raghavendra


Nov 18 '05 #2
Thanks for your answer.
But as I told that my textboxes are bound to the DataGrid control. should I
set the text boxes attributes in the datafill function everytime from the
code behind.
Thanks.

"Ken Cox [Microsoft MVP]" wrote:
That's by design. The password textbox doesn't refill the value.

You can defeat the protection by adding the password as a "value" attribute.

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
TextBox1.Attributes.Add("value", "thePassword")
End Sub
<asp:textbox id="TextBox1" runat="server"
textmode="Password"></asp:textbox></p>

Ken
MVP [ASP.NET]
"Raghavendra V" <Ra**********@discussions.microsoft.com> wrote in message
news:18**********************************@microsof t.com...
Hi all,
I have a datagrid and textboxes as columns. But when i say the textbox
property as PASSWORD the * (stars) does not display in the password text
box
at runtime.
But when it is a normal textbox the text gets displayed in the control.

I will be happy if someone can answer this problem.
Thanks in advance

Raghavendra


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Charles Astwood | last post by:
Hi, just starting out working my way round C Sharp and aspx. Used to write all my sites in asp and just need a few pointers in how to display data. I have made a connection to my SQL2000...
5
by: Jeff | last post by:
IDE: VS 2003 :NET OS: XP Pro My app have a form with a tab-control on it. The tab-control have 2 tabpages. One of the tabpages displays a datagrid, and the other tabpage displays details (order...
3
by: vinayak | last post by:
Hi I am displaying data in Datagrid in ASP.NET with Edit/Update functionality for each row. On the same page I have 2 Button controls which submits the request to server. These button controls...
0
by: Clement | last post by:
I have an user control(Control1) that dynamically adds another user control(Control2). In Control2, I am displaying data in a datagrid which I enable paging and sorting. When I click on the page...
4
by: Tim T | last post by:
Hi, I have a stored procedure executing a search and an asp.net page displaying the results in a datagrid. The datagrid has paging on it, I am using Visual Studio.NET and can't see any option...
0
by: Raed Sawalha | last post by:
I have aspx page with user control , in the user control i have DataGrid with custom paging the grid is displaying contents of datatable as following schema <xs:element name="id"...
0
by: Tim::.. | last post by:
Hi... I'm having a big problem with a datagrid that obtains data from 2 different locations... Active Directory and SQL Database The data is inserted into a datatable and the sorted by a...
1
by: Eustice Scrubb | last post by:
I'm trying to use the Insert.aspx Quickstart and I'm getting a NULL pointer exception. Any help? <code> <script language="VB" runat="server"> Dim myConnection As SqlConnection Sub...
4
by: JJGarcia | last post by:
Hi Everyone, I'll try to explain the process I'm following, I'm new to this so I'm triying the easy way first, probably the lasyest too! I created a new Project, drag in to it a SQLConnection,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.