Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
17
Answers
Using UserControl textBox value in Form
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
billypostman
14y
9.7k
1
Reply
Hi,
I have a calculator.cs (it is an userControl). I'm using it in the file iskonto.cs named which is windows form. When the calculator's textbox changed, i want to use the textbox value in iskonto.cs... Please help me with this issue. Here is my code;
calculator.cs
iskonto indirim = new iskonto();
private void txtResult_TextChanged(object sender, EventArgs e)
{
indirim.iskontoGoster(txtResult.Text.ToString());
}
iskonto.cs
public void iskontoGoster(string textBoxValue)
{
if (textBoxValue != null || textBoxValue != "")
{
button1.Text = "% " + textBoxValue + " iskonto yap. Sonuç = ";
button1.BackColor = System.Drawing.Color.Navy;
button1.ForeColor = System.Drawing.Color.Yellow;
}
}
Post
Reset
Cancel
Answers (
17
)
Next Recommended Forum
how can i run this code in a thread
C Sharp MonthCalendar Control