If you want to change the
Text
property, then set the
Text
property. But make sure you only do it when the page is first loaded, otherwise you'll overwrite whatever value the user has entered.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Page.IsPostBack Then
BoxFirstname.Text = "Test text"
End If
End Sub
If you want to change the placeholder, then you need to set the
placeholder
attribute:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Page.IsPostBack Then
BoxFirstname.Attributes.Add("placeholder", "Test text")
End If
End Sub
If you want to set the background colour, you need to modify the style:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Page.IsPostBack Then
BoxFirstname.Style.Add("background-color", "#424242")
End If
End Sub