I have a UserControl in Winform, which has textbox1
. I have a separate controller class where the code execution happens.
Here is the controller class code:
foreach(DataRow Dtrw in DataTabl1.Rows)
{
Usercontrol1 Uc = new Usercontrol();
Uc.Textbox1.text = Dtrw["Col1"].ToString().Trim();
}
But this is not working, as textbox1
is not accessible. Is there any other way I can implement it?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.