4
Answers

updating the label text from controller's action method

Photo of Anu

Anu

1y
676
1

Hi,

I have a label used in my view page as below

@Html.Label("label1")

 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 asp.net 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)