|
-
Oct 23rd, 2003, 05:48 AM
#1
Thread Starter
Fanatic Member
highlight text
Hi,
I need to be able to seach a text box for a string and if it is contained highlight it(much like the 'find' on IE.)
I know how to search the textbox using instr, but how do i highight the text? In VB6 it used to be selStart and selLength or something but can't do it in asp.net.
Thanks
Nick
-
Oct 23rd, 2003, 08:43 AM
#2
Frenzied Member
Check the following
Code:
SelectedText - Gets or sets a value indicating the currently selected text in the control.
SelectionLength - Gets or sets the number of characters selected in the text box.
SelectionStart - Gets or sets the starting point of text selected in the text box.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Oct 23rd, 2003, 09:02 AM
#3
Thread Starter
Fanatic Member
yeah i found that but i think that only works for windows controls, not webcontrols.
-
Oct 24th, 2003, 07:31 PM
#4
PowerPoster
You are working with a stateless and limited GUI environment. Somethings will have to be done client side. So, ASP.NET can't do this for you, but I believe you can do what you want with javascript. You should look in that direction.
Here, maybe this will get you started:
http://www.planetsourcecode.com/vb/s...d=197&lngWId=2
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|