I expect the input variable to have the same value as the form's text when the action function is fired, but I receive these errors when running it (both are for line 374):
E0349 no operator "=" matches these operands
C2679 binary '=': no operator found which takes a right-hand operand of type 'System::String ^' (or there is no acceptable conversion)
And what is the type of input1->Text? It's a System::String^, right?
The problem is they're two different types. Your string input; is presumably a std::string input;, which is part of the C++ standard library, and a separate type from Microsoft's CLR/.NET string.