0

how I am new to c# and I have a question

I have to create a form, it is of 2 pages so I created 2 different forms, now based on the database table, I have to fill few textboxes in form2 in order to overcome the exception of crashing as there are relationship between various tables.

My question is I need to write a code which denotes the textboxes in form1 when I click on the button on form 2 that saves all the values to the database.

I tried with this code but it did not work
form2 otherForm = new form2();
int tb = otherForm.TextBox6.Text;

can anybody help me on this ???

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by sadhawan
0

i didnt really get ur question .So what u r trying to do is to fill some info in a text box which is in form 1 and then when u press button u ll go to form 2 and now when u press button in form 2 the text box info from text box 1 should get inserted in databse.Let me know if I am right

0

ya thats wat I want, When i click the button in Form2 , I want textbox from both form 1 and form 2 to get into the database(SQL)..

Thank you

0

when u ll click submit on first form the values in the text box will have to go somewhereor the second option is to create a text box in second form that will get the value from first form and then u can submit them together.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.