473,383 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

What text has been selected within a textbox on a web page?

Hi,
I am using C#.net 2.0 to write a web application. I would like to be able
to programmatically detect what text has been selected in a textbox control.
Is this possible? If not, is there some other control which will allow users
to enter their own text, then select some of it, and have the code read what
has been selected?
Thanks!
Ethan

Oct 28 '08 #1
2 1405
"Ethan Strauss" <Et**********@discussions.microsoft.comwrote in message
news:48**********************************@microsof t.com...
I am using C#.net 2.0 to write a web application. I would like to be
able
to programmatically detect what text has been selected in a textbox
control.
Is this possible? If not, is there some other control which will allow
users
to enter their own text, then select some of it, and have the code read
what
has been selected?
http://www.google.co.uk/search?sourc...lected+text%22
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 28 '08 #2
Javascript only? I guess I can do that.
Thanks!
Ethan

"Mark Rae [MVP]" wrote:
"Ethan Strauss" <Et**********@discussions.microsoft.comwrote in message
news:48**********************************@microsof t.com...
I am using C#.net 2.0 to write a web application. I would like to be
able
to programmatically detect what text has been selected in a textbox
control.
Is this possible? If not, is there some other control which will allow
users
to enter their own text, then select some of it, and have the code read
what
has been selected?

http://www.google.co.uk/search?sourc...lected+text%22
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 29 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paolo Tardivel via DotNetMonster.com | last post by:
I have a databound datagrid containing template columns which allow editing of the values contained in the datagrid through the use of text boxes. One of the fields in the datagrid displays the...
4
by: melanieab | last post by:
Hi, I need to write something so that when a textbox is entered (this is for a touchscreen), all the text in that textbox is selected (highlighted) and new keystrokes replace the old text. Help!...
2
by: Jim in Arizona | last post by:
Being new, i experiment a lot and usually get results I'm not hoping for. My current problem is reading from a SQL 2000 table and populating an ASP dropdownlist with a column from the table. The...
11
by: antonyliu2002 | last post by:
I know that this has been asked and answered thousands of times. As a matter of fact, I know that I need to say If Not Page.IsPostBack Then 'Do something End If for things that needs to be...
1
by: =?Utf-8?B?am9uZWZlcg==?= | last post by:
I keep getting the message after I converted a regular aspx page to now be based on a master page: "Only Content controls are allowed directly in a content page that contains Content controls."...
0
by: andytsummers | last post by:
Hi I have tried to implement drag and drop by using the following code but I have several problems. 1. When you put your mouse over selected text the cursor is still the i-beam and therefore...
8
by: Jeanette White | last post by:
I am trying to create a custom validator to validate that if "Other" is selected from a drop downdown list then a textbox is displayed and a comment is required. The display textbox piece is...
0
by: none | last post by:
I have tried the Selected Method but it seams that the textbox is losing focus win I click the button... "none" <none@none.comwrote in message news:eaJIxCA7IHA.2260@TK2MSFTNGP03.phx.gbl...
16
by: raylopez99 | last post by:
I am running out of printing paper trying to debug this...it has to be trivial, but I cannot figure it out--can you? Why am I not printing text, but just the initial string "howdy"? On the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.