we can do it in this way
get the value from the text box,get the substring value declare is as a string and append page extention to it in the controller class redirect by passing the string value(the appended) which will forword to the page you want