hello there... need some help here, is it possible to get the value of a textbox from a form.cs, and use its value to a new class? if yes, how can i do it???, see, i have a textbox from a form.cs, and then i created a new class, in the new class i've created, i need to use the value of the textbox from the form.cs, but im having error " The name 'txtbox.Text' does not exist in the current context" hope someone could help me on this... thank you very very much...
sjn21682
0
Newbie Poster
Recommended Answers
Jump to Postcould you provide some code so I can see what is happening? Most likely you are just putting it in the wrong spot but I need to see where you put it.
Jump to Post>how to use the value of a textbox from form.cs to a new class
You can pass textbox value to an instance of new class using - Constructor, public properties or method.
Add constructor to your class,
public class MyNewClass { public …
All 6 Replies
noey699
0
Light Poster
kvprajapati
1,826
Posting Genius
Team Colleague
ddanbe
2,724
Professional Procrastinator
Featured Poster
chiwawa10
77
Junior Poster
sjn21682
0
Newbie Poster
jonsca
1,059
Quantitative Phrenologist
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.