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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:48:49+00:00 2026-05-29T10:48:49+00:00

I am trying to use inheritance to pass a string from one form to

  • 0

I am trying to use inheritance to pass a string from one form to another using a ref.class. Im looking at it and to be honest I think this should work. But when debugging nothing comes up in my settings textBox…

Here is my reference Class:

    class Ref
{

    private String _url;

    public String Sett
    {

        set { _url = value; }
    }
    public String Gett
    {
        get { return _url; }
    }

and I am setting it from the main form and getting it from a settings form

Here is my main Form:

    private void webBrowser1_DocumentCompleted(object sender,WebBrowserDocumentCompletedEventArgs e)
        {Ref reff = new Ref();
        this.Text = webBrowser1.Document.Title + " - NHS Cerner Booking Dash";
        textBox1.Text = webBrowser1.Document.Url.ToString();
        reff.Sett = webBrowser1.Document.Url.ToString();

and finally this is my Settings form

    public void load()
    {
        Ref reff = new Ref();
        textBox3.Text = reff.Gett;
    }

Im sure this looks a bit complicated. So to clarify I want to take the URL from the main form and set it to my ref.class and then get it from the Ref.class to set it to a textBox in my Settings form. Thank you for looking.

  • 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-29T10:48:50+00:00Added an answer on May 29, 2026 at 10:48 am

    You don’t need any Ref class for this. In your second form create a public property and while creating that form access this property and assign the value of URL.

    Click here to see a post which does similar thing.

    In Form2

     public string URL {get; set;}
    

    In Form1

     Form2 theNewForm = new Form2();
     theNewForm.URL = "your url value";
     theNewForm.Show();
    

    Hope this works for you.

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

Sidebar

Related Questions

I am trying to use inheritance to create a class derived from runtime_error ,
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
I'm trying to use inheritance among classes defined inside a class template (inner classes).
I'm going a little nuts trying to figure out how to use template inheritance
I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath(~/App_Data/myhost.pfx), pass); on
Trying to use an excpetion class which could provide location reference for XML parsing,
I'm trying to use prototype inheritance in Javascript. The problem with my code below
I'm trying to implement a facebook like like relationship. I wanted to use inheritance
I'm trying to use inheritance in JavaScript here, and I found problem having array
I'm trying to use the methods of class as the django-celery tasks, marking it

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.