Reputation: 1653
Here is my Emial.Aspx.cs file. I have a public variable called loginEmail.
public String loginEmail;
protected void Page_Load(object sender, EventArgs e){
loginEmail= Session["Email"].ToString();
}
I want to display that variable in bellow textbox. But this is not worked for me.
<td>
<asp:TextBox ID="TextBox_name" runat="server" Text = "<%= loginEmail %>";></asp:TextBox>
</td>
Error:
Parser Error Message: Server tags cannot contain <% ... %> constructs.
Please help me.
Upvotes: 0
Views: 3200