win forms

csharp Canada
  • 18 years ago

    Question: I have 2 forms in the first I have a listbox with a buton insert who call the 2nd from in this I have a group of textbox (name, zipcode, email) How I can send this textbox to the listbox. Thanks.

  • 18 years ago

    Use Session["name"] = <object>.selectedItem;
    to set a session
    then retrieve the session in the other page
    <something> = <object(cast)>Session["name"];
    then destroy the session object..



    don't know any other method

  • 18 years ago

    Urmm... this is a c# forum not an ASP.NET forum Commodus2 you'd need to do something like this


    FormA mySecondForm = new FormA();
    mySecondForm.SomePublicProperty = this.theTextBox.Text;
    mySecondForm.Show();



    and in FormA, you'd have either


    public string SomePublicProperty;


    or


    public string SomePublicProperty {
      set { somePrivateProperty = value; }
    }

  • 18 years ago

    My mistake... it is not a Web app is it?...
    ah well.... i'm just getting into c#.NET myself. Not used to the whole idea yet

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“To iterate is human, to recurse divine” - L. Peter Deutsch