Pass values from page to user control

前端 未结 5 1747
别那么骄傲
别那么骄傲 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:22

    You need to define public properties on the control and then when you use control on the page you can pass values to those parameters.

    Something like:

    
        MyProperty2=<%# label2 %>
    />
    

提交回复
热议问题