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
Arijeet Ghosh
NA
210
37.2k
How will the value of the controls in the user-control change by code?
Jul 7 2020 1:03 AM
I have an user-control. It has got some controls. The user-control is drawn on the form. All the controls in the user control have public access modifiers when designing the control. There is no code in the usercontrol. These controls are accessed
through the external code in this way:-
{
usercontrol1 u=new usercontrol1();
u.Label1.Text="k";
}
Uptill this is okay. But during 'run' by pressing F5 Label1 of the user control is showing text as "Label1" and not "k".
How will the value of the controls in the user-control change through external code...?
Reply
Answers (
1
)
How to access user control's element programmatically...?
Object reference not set to an instance of an object error