Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
html:
<form id="Form1" method="post" runat="server">
<asp:DropDownList id=DropDownList1 runat=server AutoPostBack="True" />
....... textbox controls here....
</form>
code behind:
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(DropDownList1.SelectedValue == someValue)
{
HtmlForm form = (HtmlForm)Page.FindControl("Form1");
foreach(Control ctrl in form.Controls)
{
if(ctrl is TextBox)
{
((TextBox)ctrl).Text = "";
}
}
}
}
if DropDownList1.SelectedValue = someValue then
dim form as HtmlForm = ctype(Page.FindControl("Form1"), HtmlForm)
for each Control ctrl in form.Controls
' not sure about this line, if VB has the "is" keyword
if ctrl is TextBox then
dim txt as TextBox = CType(ctrl, TextBox)
txt.Text = "";
end if
next
end if