Quote:
I want to make the student add the values entered in the textbox according to which database it exists.
If understand you well, you want to add student information to the corresponding database, but you did not provide enough information about database choose process.
If you want to let user to choose a database in which data will be saved, you can add combobox with database name. Then, depending on user choice, you'll be able to add data into proper database. In pseudo code:
if(ComboBox1.SelectedValue.ToString() == "School1")
else
Note: This is NOT a perfect solution, due to several reasons.
I'd rather let user to choose the database context on application start.