caption/text property of Button control
-
I want to handle Edit and update both from one Button control in Winform2008, let me know , how can I do this….
Vinay
-
I want to handle Edit and update both from one Button control in Winform2008, let me know , how can I do this….
Vinay
Not enough information to answer your question. The biggest problem with this design is how is the button click handler going to know the difference in the users intent when the button is clicked??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
I want to handle Edit and update both from one Button control in Winform2008, let me know , how can I do this….
Vinay
Keep a Form level variable to get the mode of the screen.
private String mode = "Edit";
Now change this mode whenever, your form's mode is being changed. Based on this private varible you can decide the text of the button.
btnSave.Text = (mode == "Edit")?"Edit" : "Update";
Hope this yould help you. :) Regards, Arindam Sinha