I have added a literal control in my visual web part VisualWebPart1.ascx file as follows:
<asp:Literal id="slider"></asp:Literal>
I am trying to access it in VisualWebPart1.ascx.cs file as follows but it is not working:
protected void Page_load(object sender, EventArgs e)
{
slider.Text = "Testing";
}