how to call a variable in code behind to aspx page

后端 未结 9 1911
暗喜
暗喜 2020-11-27 07:06

i know i have seen this but cant recall the correct way of doing it... basically i have a string variable called \"string clients\" in my .cs file.. but i wasn\'t to be able

9条回答
  •  执笔经年
    2020-11-27 07:20

    I would create a property to access the variable, like this:

    protected string Test
    {
        get; set;
    }
    

    And in your markup:

    <%= this.Test %>
    

提交回复
热议问题