473,804 Members | 3,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1941
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.co m> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.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******** ********@TK2MSF TNGP12.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******** ********@TK2MSF TNGP12.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!

"Christophe r Reed" <ca****@nospam. nospam> wrote in message
news:ug******** ******@tk2msftn gp13.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******** ********@TK2MSF TNGP12.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
2189
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 with no additional code. I just inherited from the exisiting ListBox class and put the control on a page. I put this control a blank page along with a button to perform a post back. I select an item in the list box and then click the button...
11
3806
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 symbols insert without problem from query analyzer, so that suggests it's something within ASP.NET. I've tried using .NET textbox web controls as well as html textareas. I have a test database set up with 4 fields: varchar, nvarchar, text, and...
0
1400
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. Question #1: In the Add button Command Event I am trying to access the Text value of the TextBox in the other Footer columns. However, inside the Event, the TextBox.Text values are all empty strings, even if they had data typed into them. Is this a...
1
4232
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 of the process I am finding that the value of my password control is blank. When I set the textmode of my textbox to singleline, the value is preserved. It is just when the textbox is set to password that I lose the value. I am casting to the...
2
9143
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 I should make a button on the grid row visible. However, the problem with autopostback on a textbox is the postback occurrs when you select another control or click away ( I guess). This is very awkward when the control selected is dropdown as...
4
4769
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 to demonstrate my issues. Lets say I have a WebForm with a DropDownList where the user selects a number from 1 to 10 (the DropDownList is not dynamically created). I also have a button on there that I use to trigger a PostBack. Based on the...
0
1516
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 an update panel. I store the ID for the generated textboxes in the Viewstate, which I use in the Panels' INIT eventhandler to go ahead and instantiate the textboxes once again every postback. I use the, in my opinion, old mechanism of retreiving
0
3028
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
1795
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 values in one of my TextBox controls. It is there when I first load the page from another page but gets lost as soon as I click the HyperLink. What am I missing? Thanks. David
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10575
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10330
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10076
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7616
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.