TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jay Stewart
NA
164
1.8k
class/textbox/loop
May 22 2017 7:17 PM
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
Reply
Answers (
4
)
How to display the messagebox if Qty "Stock It Out" c #
Binary to Decimal Conversion