• 1.5k
  • 129
  • 5.3k

updating the label text from controller's action method

Aug 16 2023 12:55 PM


I have a label used in my view page as below


 I want to change the text of a label from the controller's action method. It shoud be something like the below code which we can set in the webform

<asp:label id="label1" runat="server"/>

//from the code behind function

label1.Text="new text";

 Can some one please check and help me to resolve the issue?

Answers (4)