How do I set an ASP.NET Label text from code behind on page load?

前端 未结 7 1728
终归单人心
终归单人心 2020-12-03 07:39

I can\'t seem to find an answer out there for this. Here\'s the scenario: I have an ASP.NET project using C#. I\'m loading data (Username, email, etc...) from a sqlite datab

7条回答
  •  隐瞒了意图╮
    2020-12-03 07:49

    protected void Page_Load(object sender, EventArgs e)
    {
        myLabel.Text = "My text";
    }
    

    this is the base of ASP.Net, thinking in controls, not html flow.

    Consider following a course, or reading a beginner book... and first, forget what you did in php :)

提交回复
热议问题