Hey guys i got this code working 50%..

i have a login that passes the info to my main form that i need to search the txt file and show all info regarding info(NIP)

in my txt file

name,account number,cash,Nip

so i search for the Nip since that is the only info i get from the login form

when it finds the nip i need to show the name,account....associated with the nip

the output shows only the element in search,not the rest?

InitializeComponent();


            string NipClient = qs;



            var NipU = qs;



            richTextBox2user.Show();


            richTextBox2user.AppendText(NipU);



            System.IO.StreamReader reader = new System.IO.StreamReader("comptes.txt");



            String text = reader.ReadToEnd();



            if (System.Text.RegularExpressions.Regex.IsMatch(text, NipU))



            {



                richTextBox2user.SelectedText = NipU;


            }

            else


            {


                richTextBox2user.Text = "Try Again";


            }

sorry its search collection....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.