Web Forms error message: “This is not scriptlet. Will be output as plain text”

后端 未结 3 616
醉酒成梦
醉酒成梦 2020-12-09 08:38

In my ASP .NET Web Forms I have the following declarative code:

\' />         


        
3条回答
  •  感情败类
    2020-12-09 08:58

    This will work.

    Mark up

    
    

    Code-behind

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            txtbox.DataBind();
        }
    }
    

    But its a lot cleaner to access the CssClass property of the asp:TextBox on Page_Load

提交回复
热议问题