I was looking for how to make a password char in console. I solved it it with this [URL] ....
But is there anyway to read the password and if its GOOD, it change the pass tthe word "RIGHT Password" And if its wrong make it "Bad password", then make a new line with again. "Enter password"....
i'm a new developer...i have been given a project to generate a user name of 6 chars. the user name has 1st 2 char the 1st 2 letters of the name and remaining 4 char as any random numbers. alone with that i have to send a random password with it..
I want to edit an user.I dispay the corresponding data(username, email,..etc..password, confirmation pass)The problem is that those password fields are empty.Q: When i display data in the formthe two password fields are empty. How can i make them contain data?
I am using asp.net-mvc 2 <div class="editor-label"> <%: Html.LabelFor(m => m.Password) %> </div> <div class="editor-field"> <%: Html.PasswordFor(m => m.Password)%> <%: Html.ValidationMessageFor(m => m.Password)%> </div>
I have a website that has anonymous authentication enabled. Now for a particular folder I want the users to be logged in with a userid and password. The user id and password is going to be same for everyone.
Eg user id is TEST and Password is answer. How can I do that?
I went in to that folder ->properties->directory security->edit-> And I disabled the anonymous access
But where should I add the User Id and Password? Under which option.
When a user that has their IE set to save passwords hits my "Reset Password" form, the first text box set with TextMode set to "Password" is populated with the users saved password. Understandable, this is not the affect I would like as this is their "old" password. I cannot set the text of a text box with mode set to "Password" (naturally). Does someone know how to suppress or clear this value when IE is saving passwords?
when I add "%" character to the mvc url prject I get bad request from server , how to let such character to be allowed in the url I want this to work if possible/Home/%2fContentFiles%2fImages%2f2.jpg/194/184/w if I remove "%" it work fine
I have a list XML elements that I need to compare to chars in an array. Some of the XML elements start with uppercase characters and some dont.
So I need to convert the XML elements to lowercase to compare them against "alphabet".
I'm doing this by converting the XML element to a string. Then setting that to lowercase. Then converting that to a char. Then comparing that to each char in "alphabet".
Is there a better way to get the XML into lowercase? IE without the two conversions
I am using SQL Server 2008 Web Edition and it seems my SQL queries are automagically having the double quotes replaced with ' + CHAR(34) + '. I am trying to pin down why this is happening, I am using Delphi with ASP.NET and using the ADO.NET object for the SQL.
When I try to run the following code it always spits out the hex representation, not the integer representation. Most of the examples I found on MSDN said this should work. What am I missing?
var stringBuilder = new StringBuilder("8"); int j = 0; foreach (char item in stringBuilder.ToString()) { j = Convert.ToInt32(item); //returns 38, need return to be 56 }
edit I should have made clear that I know the difference it's returning the hex value. I'm outputting the value to a file, and in that file, it still shows the hex value, not the integer, so I don't think it has anything to do with the debugging environment. edit2 Looks like a PEBKAC problem. Looked at the code that was writing to the file, and it was using a .toString("X") method, changing it to a Hex value. The fact that it was hex in my debug environment was what confused me.
i wanna convert char to double type and convert it to date.char->double then double -> date type.I have a whole string and i trim it into 3 parts. In my item(2) is a UNIX Timestamp i'm trying to convert it into date type.
I am building a page which has to search an access table with the text input entered by the user. The thing that is puzzling to me is that the functionality works only when a '%' is explicitly added to the text input at the begginning and end.
If I add '%' programattically in the code behind file, it does not work. code snippet ( asp page):
<asp:AccessDataSource ID="AccessDataSourcex" runat="server" DataFile="~/App_Data/company.mdb" SelectCommand="SELECT [ID], [emp name] AS emp_name, [emp title] AS emp_title FROM [EmpMain] WHERE ([emp name] like [code]...
//the below line is of no use, the % char has to be in the text input
//txtSearch.Text = "%" + txtSearch.Text + "%";
GridView1.DataBind(); <---- this works fine
<--- this does not work, even if I add % chars programatically..
My question is: why does it not work when I programattically add the '%' chars to the search string..
I'm using DAAB from MS Ent Library 4.1. I have this function in my DAL that returns a dataset.
[Code]....
However, it is failing with this error:Failed to convert parameter value from a String to a Boolean. But if I use SqlDbType.VarChar instead it works fine. I want to use Char b/c that is the correct datatype in SQL.In my SP the param is @CUSTNMBR char(15). In my database table the field is also char(15).
Let's say I am pulling data from SQL using a function that returns one field - date. I can see that in my model code for a getter, setter, and other things are set for DateTime. What happens if I go into the function and convert selection of my date field into char(10)?
I have the following string stored in a char column of sql server (there are several this one is just an example):
Code: ROix5LkY0Zps4MPcWnSmiw==
I also have the key used to generate the string:
Code: 6B9245B1A88A82FC328C8A1B8870E34D
And I found the following solution to decryp and encrypt:
Code: Dim des As New TripleDESCryptoServiceProvider Dim md5 As New MD5CryptoServiceProvider 'hash function Function md5hash(value As String) As Byte() Return md5.ComputeHash(ASCIIEncoding.ASCII.GetBytes(value)) End Function
[Code] ...
It works like a charm when i encrypt and decrypt values set by me in the page;
But when i use the value stored in the DB it throws the following error;
"An exception of type 'System.Security.Cryptography.CryptographicException' occurred in mscorlib.dll but was not handled in user code
Additional information: Bad Data."
I am i using the wrong crypto class ? it's a length issue? the string is not base64?