1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Passing Data between Forms.

Discussion in 'C#' started by bouzoukicentral, May 10, 2010.

  1. bouzoukicentral

    bouzoukicentral New Member

    Joined:
    May 10, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hey guys im new to this forum and your help would be very much appreciated.

    Didnt know where to post so sorry.

    Here is my situation:

    I have 2 forms. Using Visual Studio.

    On Form 1 there is a populated combo box. This was done so by running a query through it and populating it with PUZ_ID values from a data set.

    On form two there is a tool strip and below is a search query.

    I need to be able to select the value i want in the combo box on form 1, and launch a button that opens form 2, which has loaded the data that i binded onto the form.

    Anyone have any ideas/code or need me to clear this up a bit more?

    So i need to run something through a query, or make something public or what?

    Your help is much appreciated.
     
  2. satyedra pal

    satyedra pal New Member

    Joined:
    Mar 26, 2010
    Messages:
    93
    Likes Received:
    1
    Trophy Points:
    0
    In what type project you want to access as in window based or web Based.
    In window based project you will provide it as public and you can use it by using object of page
    pageobject.TextBox.ToString();
     
  3. DevPro

    DevPro New Member

    Joined:
    May 31, 2010
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Pass the data as a Form (class) parameter.

    @satyedra_pal
    Wouldn't it be pageobject.TextBox.Text ?
     

Share This Page