开发者

.aspx get data from. cs files?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜