开发者

.aspx get data from. cs files?

开发者 https://www.devze.com 2022-12-12 08:48 出处:网络
Is databind, bind or eval... only way of getting data form code behind (server side) in AS开发者_开发问答P.NET No you can expose any data from the code using server tags.For example if you have a prop

Is databind, bind or eval... only way of getting data form code behind (server side) in AS开发者_开发问答P.NET


No you can expose any data from the code using server tags. For example if you have a property in the codebehind thats an object called Person you can expose it like so

<p>Hello your name is <% =Person.Name%></p>

Edit: Any properties or methods can be accesses in this way as the aspx page essentially inherits from the codebehind class, but the accessors will need to be set to at least protected as a result

0

精彩评论

暂无评论...
验证码 换一张
取 消