define your property as public or protected in code behind file.using server side syntax you can use that in aspx file
public string CodeBehindVarProperty
{
get
{
return "Property Variable";
} }
protected void Page_Load(object sender, EventArgs e)
{
// Bind data from code-behind to ASPX server controls
Page.DataBind();
}
in aspx
<%=CodeBehindVarPublic %>