Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
class/textbox/loop
Jay Stewart
7y
184
1
Reply
I have a class with the follwing method in
public
static
void
myMethod(Home_Form formObject)
{
foreach
(Control X
in
formObject.Controls)
{
var tb = X
as
TextBox;
if
(tb !=
null
)
if
(tb.Text == @
"53"
)
{
tb.Text = @
"Hammer"
;
}
}
}
And in my Mainform
private
void
bonus1TypeTextBox_TextChanged(
object
sender, EventArgs e)
{
Variables.myMethod(
this
);
}
Now I Know this is wrong, But if any text box on my Main Form contains 53 when being pulled from a dataset I need to changes its text to Hammer....
Can somebody please advice, hope I have made myself clear.
Jay
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
How to display the messagebox if Qty "Stock It Out" c #
Binary to Decimal Conversion