473,395 Members | 1,681 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,395 software developers and data experts.

Losing data in a textbox on postback

et
In a procedure where a user creates a password, among other things, the
password textbox returns to blank whenever a user selects other fields that
cause a postback, even though they are not done saving the record.. How can
I retain what the user has entered in the password field even on postback?
And why does it only happen to the password field; all other fields are
retained.
Dec 22 '05 #1
6 1916
Chk for enableviewstate property true ?
- Kailas

Dec 22 '05 #2
Chk for enableviewstate property = true for the password textbox?
- Kailas

Dec 22 '05 #3
Yes, it's enabled. Still lose it.
<ka******************@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Chk for enableviewstate property = true for the password textbox?
- Kailas

Dec 22 '05 #4
You can not, PW is different.

Use the form posted data stuff.
"et" <ea*************@yahoo.com> schreef in bericht
news:%2****************@TK2MSFTNGP12.phx.gbl...
In a procedure where a user creates a password, among other things, the
password textbox returns to blank whenever a user selects other fields
that cause a postback, even though they are not done saving the record..
How can I retain what the user has entered in the password field even on
postback? And why does it only happen to the password field; all other
fields are retained.

Dec 23 '05 #5
For security reasons, a password is not normally retained with a postback
because anyone will be able to see the password from the HTML source. Your
best option is to create a ViewState variable of your own and assign the
password to it on postback in most likely the Page_Load method. Then, in
the Page_PreRender method, reassign the password back to that particular
textbox.

Your truly best option is to collect all of the information first before you
have to postback. That way, you can process the password and forget about
it.

Hope this helps!
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"et" <ea*************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
In a procedure where a user creates a password, among other things, the
password textbox returns to blank whenever a user selects other fields
that cause a postback, even though they are not done saving the record..
How can I retain what the user has entered in the password field even on
postback? And why does it only happen to the password field; all other
fields are retained.

Dec 23 '05 #6
dew
I agree, that's probably the best idea, fill out everything else, then enter
the password. Thanks everyone!

"Christopher Reed" <ca****@nospam.nospam> wrote in message
news:ug**************@tk2msftngp13.phx.gbl...
For security reasons, a password is not normally retained with a postback
because anyone will be able to see the password from the HTML source.
Your best option is to create a ViewState variable of your own and assign
the password to it on postback in most likely the Page_Load method. Then,
in the Page_PreRender method, reassign the password back to that
particular textbox.

Your truly best option is to collect all of the information first before
you have to postback. That way, you can process the password and forget
about it.

Hope this helps!
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"et" <ea*************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
In a procedure where a user creates a password, among other things, the
password textbox returns to blank whenever a user selects other fields
that cause a postback, even though they are not done saving the record..
How can I retain what the user has entered in the password field even on
postback? And why does it only happen to the password field; all other
fields are retained.


Jan 4 '06 #7

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

Similar topics

1
by: chambersdon | last post by:
I have created a Web Custom Control that inherits from WebControls.ListBox but can't get it to retain the selectedIndex after a postback. As a test I created a very simple version of the control...
11
by: anony | last post by:
Hello, I can't figure out why my parameterized query from an ASP.NET page is dropping "special" characters such as accented quotes & apostrophes, the registered trademark symbol, etc. These...
0
by: jason | last post by:
Hello everyone. I am trying to write some custom command events into a DataGrid. The command that is currently giving me trouble is an "Add" custom command in the footer of a template column. ...
1
by: jqheller | last post by:
Folks I am losing my mind trying to work with the TemplatedWizardStep. I have created a multistep user registration form that collects plenty of user information including a password. At the end...
2
by: wildman | last post by:
RE: Gridview textbox has data check without postback.. javascript? I have a gridview with a textbox. I can set the textbox to autopostback and check for a value in a prerender event to decide if...
4
by: =?Utf-8?B?RHlsYW5TbWl0aA==?= | last post by:
I have a WebForm where I'm dynamically creating some controls and I'm having difficulty understanding how the state is being persisted and how to work with it. I've created a simplified example...
0
by: rvdnieuwenhuizen | last post by:
Hi, The problem I cannot seem to solve: I have a page with a button control. In the On_Click eventhandler I dynamically add one TextBox each time the button is clicked. I add the textboxes to...
0
by: dcollier9 | last post by:
Hi ! I need to embed a text box in a footer of a GridView's boundfield column to get data prior to a row insert. The textbox is usable and showing up in the web page source using View
3
by: David C | last post by:
I have an aspx page that has HyperLink controls that have NavigateURL set to the current page. I was assuming that would postback but it comes back like the first time in the page and I am losing...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.