Question

Is databind, bind or eval... only way of getting data form code behind (server side) in ASP.NET

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top