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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:15:17+00:00 2026-05-12T09:15:17+00:00

I have a custom form that’s returning the values to the main form but

  • 0

I have a custom form that’s returning the values to the main form but it’s not seeing the variables. I don’t think I’m making this very clear so I’ll include the links to the examples of what I’m trying to do.

  • Return values from dialog box
  • too long to display

I know I’m probably overlooking something very easy and or obvious but here is what I have.

form1.cs:

private void addTime_Click(object sender, EventArgs e)
{
    Form add = new addTime(false, new string[] { "", "" });
    if (add.ShowDialog(this) == DialogResult.OK)
    {
        // the line not working
        Label1.Text = add.Details;
        // reports with:'System.Windows.Forms.Form' does not contain a
        // definition for 'Details' and no extension method 'Details' accepting       
        // a first argument of type 'System.Windows.Forms.Form' could be found (are you
        // missing a using directive or an assembly reference?)
    }
}

addTime.cs:

internal class addTime : Form
{
    //..

    private string _details;
    public string Details
    {
        get { return _details; }
        private set { _details = value; }
    }

    private string _goalTime;
    public string GoalTime
    {
        get { return _goalTime; }
        private set { _goalTime = value; }
    }

    private void applybtn_Click(object sender, EventArgs e)
    {
        Details = detailslbl.Text;
        GoalTime = goalTimelbl.Text;
    }
}
  • 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-12T09:15:17+00:00Added an answer on May 12, 2026 at 9:15 am

    Your ‘add’ variable is of type Form, not addTime and the Form type does not have a Details property.

    Try this line instead:

    addTime add = new addTime(false, new string[] { "", "" });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have custom errors configured in my web.config, but IIS 6.0 is returning the
I have written a custom dialog (form) that I can use in a C#
I have a custom sharepoint aspx form that has an InputFormTextBox with RichText property
I have a form that calls a custom child form. The child form is
I have a WPF application with a form that, when started, invokes a custom
I have a form that I would like to draw a custom title bar
I would like to have a custom snippet of html form code that takes
Can you have custom client-side javascript Validation for standard ASP.NET Web Form Validators? For
I have a custom site definition which includes a form library. I have a
I have a c# form (let's call it MainForm) with a number of custom

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.