Input value is updated properly when in page load:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
txtSupplierType.Value = "Local";
}
}
but when we try to update it from other control events like:
ASPX Page
<asp:DropDownList runat="server" ID="ddlProduct" name="form-control" class="form-control select-chosen" OnSelectedIndexChanged="ddlProduct_SelectedIndexChanged" AutoPostBack="true"> </asp:DropDownList>
SelectedIndexChanged Event
protected void ddlProduct_SelectedIndexChanged(object sender, EventArgs e)
{
txtSupplierType.Value = "Global";
}
it won't update and many other html controls with runat="server" do not work as in page load:
<input type="text" id="txtSupplierType" runat="server" name="example-text-input" class="form-control" />