Simple Login
-
How do i login by a streamreader .txt file..? when: textbox1.text(username) textbox2.text(username) .txt file are build like this # username password Tnx All!!;):laugh::)
your question is missing a lot of details. File.ReadAllLines ( from memory ) returns a string array from your file, so that's a good way to get out your username and password, is that the bit you're stuck on ? Log on to where ? What do textboxes have to do with it ? Is there a typo in your post, is the second textbox the password ? They are surely not named that ?
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
your question is missing a lot of details. File.ReadAllLines ( from memory ) returns a string array from your file, so that's a good way to get out your username and password, is that the bit you're stuck on ? Log on to where ? What do textboxes have to do with it ? Is there a typo in your post, is the second textbox the password ? They are surely not named that ?
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
no that´s just an example.. On a button_click event string q = textBox1.Text; string w = textBox2.Text; string[] lines = System.IO.File.ReadAllLines(".txt"); Int32 index = 0; while (lines.Length >= index + 10) { if ("#" != lines[index].Trim()) { index++; continue; } String username = lines[index + 0]; String password = lines[index + 1]; index += 1; if (q = username && w = password) something like this.. but its wrong, how do i start a search on textbox1.text on row0 and textbox2.text are gonna be below.. or something??? tnx:laugh:;);P:^):( -- modified at 12:47 Friday 7th September, 2007