Modified the textbox for simplepager

Added exception handing to textbox.