Saturday, March 31, 2012

SendKeys In A Webform

I have a button to insert text into a field, after inserting the text i would like to set the cursor at the end of that text to then complete the entry
I can set the text and the focus
txtNewPrice.Text ="$"
txtNewPrice.Focus()

But how can i use the send keys to move to the end of that text
In a Windows world i would do this but i dont seem to have that function in the web world
SendKeys.Send("{END}")

you can try using javascript for that


Could you give me an example


Hi

I needed something similar this weekend. Found this and it works fine.

http://www.velocityreviews.com/forums/t70952-set-focus-and-cursor-at-end-of-text.html

0 comments:

Post a Comment