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 6746553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:20:11+00:00 2026-05-26T12:20:11+00:00

I have made a secondary form in my project which can get data from

  • 0

I have made a secondary form in my project which can get data from the main form, and should pass some out to the main form when a button is clicked.
here is the code:

Add.cs:

        private void button1_Click(object sender, EventArgs e)
        {
            main ma = new main();

                ma.optionType = "add";
                ma.optionName = txtName.Text;
                ma.optionURL = txtURL.Text;
                ma.optionInterval = "12";
                //What should I pass here?


            this.Close();
        }

main.cs:

  private string opt;// create a property
        public string optionType
        {
            get
            {
                return opt;
            }
            set
            {
                opt = value;
            }
        }
        private string opt2;// create a property
        public string optionName
        {
            get
            {
                return opt2;
            }
            set
            {
                opt2 = value;
            }
        }
        private string opt3;// create a property
        public string optionURL
        {
            get
            {
                return opt3;
            }
            set
            {
                opt3 = value;
            }
        }
        private string opt4;// create a property
        public string optionInterval
        {
            get
            {
                return opt4;
            }
            set
            {
                opt4 = value;
            }
        }

My problem is that I don’t know when to try to fetch the data coming from add.cs after button1 (in add.cs) was clicked. With what event should I check if the data came?

  • 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-26T12:20:12+00:00Added an answer on May 26, 2026 at 12:20 pm

    I just changed it to this:
    add.cs:

     public string optionType { get; set; }
     public string optionName { get; set; }
     public string optionURL { get; set; }
     public string optionInterval { get; set; }
     public int yCoord { get; set; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a class which a form can inherit from and it handles
I have made some code which exports some details of a journal article to
I have made a user control in asp.net c#. Becuase of some data I
I have made a custom UserControl i Vb.net (windows application). How can I add
I have made a new windows service which works fine using barebone code (just
I have made a multiplayer game using the GameKit Framework where 2 iPhones/iPods can
I made a keyboard with some functionalities but i have no idea how to
In my iPhone application, I have a secondary thread that I have made for
I have a HTML template which I made a typo3 template of, using automaketemplate.
I have made a SVG image, or more like mini application, for viewing graphs

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.