Click here to Skip to main content
15,881,803 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Table resizing in MVC Pin
Member 1075459527-Jul-17 10:44
Member 1075459527-Jul-17 10:44 
QuestionResponse.Cache, Code Location Pin
jkirkerx17-Jul-17 9:24
professionaljkirkerx17-Jul-17 9:24 
AnswerRe: Response.Cache, Code Location Pin
Richard Deeming17-Jul-17 10:09
mveRichard Deeming17-Jul-17 10:09 
GeneralRe: Response.Cache, Code Location Pin
jkirkerx18-Jul-17 7:38
professionaljkirkerx18-Jul-17 7:38 
QuestionUsing Visual Studio to debug iHTTPHandler routines Pin
Member 839420716-Jul-17 21:26
Member 839420716-Jul-17 21:26 
Questionwhat is default concurrent requests settings in IIS 8.5 Pin
bhavin chheda16-Jul-17 2:02
bhavin chheda16-Jul-17 2:02 
AnswerRe: what is default concurrent requests settings in IIS 8.5 Pin
Richard MacCutchan16-Jul-17 2:42
mveRichard MacCutchan16-Jul-17 2:42 
QuestionPassword Field Padding with Question Marks (?s) Pin
ftbadolato7615-Jul-17 15:05
ftbadolato7615-Jul-17 15:05 
Hello,

The strangest thing is happening and I can't track down the source of the issue. I have a form where users can edit their profile. On the form there is a password field. Here is the code:
<asp:textbox id="txtPassword" textmode="Password" runat="server" size="30">

In the SQL database I store the password as a binary, so the UPDATE statement looks as follows:
UPDATE Account SET Password=CONVERT(BINARY,'" & Replace(txtPassword.Text, "'", "''") & "') WHERE AccountID=15

When I retrieve the data, the SQL code looks like this:
SELECT CONVERT(VARCHAR,Password) FROM Account WHERE AccountID=15

Finally, when I pass the password to the text field, the code looks like:
txtPassword.Attributes.Add("value", dsResults.Tables(0).Rows(iRowLoop).Item(5))

I have used this code hundreds of times without any issues, however, for some reason the password in the form is being converted to the password plus a bunch of question marks to fill the remaining space. My password field is size 30, so if your password is "ketchup" then this gets placed in the password field:
ketchup???????????????????????

I looked at the value in the database and there is nothing padded on the end of the value. It seems that something really weird is happening on this line:
txtPassword.Attributes.Add("value", dsResults.Tables(0).Rows(iRowLoop).Item(5))

I am at a loss and am sure I am just overlooking something very simple. I even looked at another site of mine where I have this same pattern and everything looks identical...no clue where I am going wrong.

Thanks in advance for your help!

Frank
AnswerRe: Password Field Padding with Question Marks (?s) Pin
Richard MacCutchan15-Jul-17 20:52
mveRichard MacCutchan15-Jul-17 20:52 
GeneralRe: Password Field Padding with Question Marks (?s) Pin
ftbadolato7616-Jul-17 3:36
ftbadolato7616-Jul-17 3:36 
GeneralRe: Password Field Padding with Question Marks (?s) Pin
Richard MacCutchan16-Jul-17 5:43
mveRichard MacCutchan16-Jul-17 5:43 
GeneralRe: Password Field Padding with Question Marks (?s) Pin
Nathan Minier17-Jul-17 1:15
professionalNathan Minier17-Jul-17 1:15 
AnswerRe: Password Field Padding with Question Marks (?s) Pin
Richard Deeming17-Jul-17 1:40
mveRichard Deeming17-Jul-17 1:40 
Questionmanual session id assignment Pin
jkirkerx14-Jul-17 6:25
professionaljkirkerx14-Jul-17 6:25 
AnswerRe: manual session id assignment Pin
jkirkerx14-Jul-17 8:26
professionaljkirkerx14-Jul-17 8:26 
AnswerRe: manual session id assignment Pin
F-ES Sitecore17-Jul-17 5:13
professionalF-ES Sitecore17-Jul-17 5:13 
QuestionQuery regarding IIS Thread Pool Settings in Machine.config Pin
bhavin chheda13-Jul-17 6:51
bhavin chheda13-Jul-17 6:51 
QuestionSide bar Pin
sunsher11-Jul-17 2:19
sunsher11-Jul-17 2:19 
AnswerRe: Side bar Pin
ZurdoDev11-Jul-17 2:54
professionalZurdoDev11-Jul-17 2:54 
QuestionFTP user and user wise folder Pin
sanket1649-Jul-17 18:14
sanket1649-Jul-17 18:14 
QuestionEntity Framework 500 Error Pin
sanforjackass9-Jul-17 4:43
sanforjackass9-Jul-17 4:43 
AnswerRe: Entity Framework 500 Error Pin
Richard MacCutchan9-Jul-17 20:59
mveRichard MacCutchan9-Jul-17 20:59 
Question.lic file Pin
Member 133002248-Jul-17 17:11
Member 133002248-Jul-17 17:11 
AnswerRe: .lic file Pin
Richard MacCutchan9-Jul-17 20:58
mveRichard MacCutchan9-Jul-17 20:58 
AnswerRe: .lic file Pin
Richard Deeming10-Jul-17 2:42
mveRichard Deeming10-Jul-17 2:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.