Accessing selected text

  • Thread starter Thread starter Guest
  • Start date Start date
CodeRazor said:
How can i retrieve the value of highlighted text within a text box?

thank you.

Simply you can do "textbox_name.SelectedText" without quotes
 
Ooops - as Steph and Nikola have stated - use the property syntax and
not method call.
 
???

I get the error below when i try the code you've all suggested.

Web.UI.WebControls.TextBox' does not contain a definition for 'SelectedText'

Should textbox_name.SelectedText be used in the codebehind? javascript?

thanks
 
Back
Top