Pass values from page to user control

前端 未结 5 1588
别那么骄傲
别那么骄傲 2021-02-14 07:21

I am storing name and last name in two labels in main page. I also have those values in a class (class doesnt do much but i am using them for future expansion). I have a user co

5条回答
  •  星月不相逢
    2021-02-14 08:05

    you can do something like this in your user control

    string x=((yourparentcontrol)this.parent).label1.text;
    

    and use the string x.

提交回复
热议问题