Inherited forms loose the data entered by users.

G

Guest

I have a base C# form in my project. I inherited another form from it.
At run time, when I enter values in txtName text box, it is not available in
the inherited form. If I go back to base form, they are there.

In inherited form,
this.txtName.Text is empty.
base.txtName.Text is empty.

Seems so simple but I have not been able to get user input back for this
form. Be it text box or list box.I have tried 2 different ways of inheriting
- One using VS.Net and one just assiging base form name in source code. I
also tried making the text boxes public and protected. I have rebuild the
solution 20 times. For my another form, it works just fine.

If anybody has any idea what I am missing, please let me know.

Thanks for your time and help.
Alpa.
 
G

Guest

Found the problem. It is all logical. Somebody had put Dispose( ) call in
base btnOk_Click( )!

Thanks,
Alpa.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top