Consider this HTML:
<form id="MyForm">
<input name="Input1"/>
</form>
In Script# I do this:
FormElement form = Document.GetElementById("MyForm");
How do I get Input1 from form?
I know I can do something like this:
InputElement input1 = (InputElement)Script.Literal("form.Input1");
Just wondering if there’s a proper way to do it.
Thanks!
I believe this is a better way to do it:
Create a class to represent the form…
Typecast the form to MyForm:
And then I can access Input1 like such: