Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6712389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:15:14+00:00 2026-05-26T08:15:14+00:00

I’m writing a Phone Book application. I have a listview in which you can

  • 0

I’m writing a Phone Book application.

I have a listview in which you can view the saved data in the database. I want to add an edit option.

More specifically: When I mark a row in the table with subscribers and phone numbers and hit the Edit button a window with two text boxes is shown on the screen. In the first text box is the name and in the second – a phone number of the marked entry.

Can you tell me how to do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:15:14+00:00Added an answer on May 26, 2026 at 8:15 am

    you can do like this…

    Yes, but TextBox and ListView are in different windows and I cannot
    access it each other

    in form2 drag and drop two textboxes and do like this….

    Just create a property on the Form2 class and set it before you show Form2.

    public class Form2
    {
        public string Name
        {
            get { return textbox1.Text; }
            set { textbox1.Text = value; }
        }
        public string phonenumber
        {
            get { return textbox2.Text; }
            set { textbox2.Text = value; }
    
        }
    
     }
    
    public class Form1
    {
    
      private void btnedit_Click(object sender, eventargs e)
      {
          for (int i = 0; i < lv.Items.Count; i++)
          {
            // is i the index of the row you selected?
            if (lv.Items[i].Selected == true)
            {  
              //I show here the second field text (SubItems[1].Text) from the selected row(Items[i]) 
                    Message.Show(lv.Items[i].SubItems[1].Text);
                    break;
            }            
          }
          Form2 frm2 = new Form2();
          frm2.Name= text1;
          frm2.phonenumber = text2;
          frm2.Show();
          this.Hide();  //// if you want to hide the form1
        }
      }
    }
    

    I hope it will helps you….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view passing on information from a database: def serve_article(request, id): served_article
I have a reasonable size flat file database of text documents mostly saved in
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I have an autohotkey script which looks up a word in a bilingual dictionary
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I want to construct a data frame in an Rcpp function, but when I
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.