I am using bootstrap modal in my asp.net page like this:
Use the dotnet text box, or add an id and a runat server tag to the input field.