Q: Retrieve Selected Text from TextField

Discussion in 'ASP .Net Web Controls' started by Soul, Jan 18, 2004.

  1. Soul

    Soul Guest

    Hi,

    In ASP.Net page, Is there a way to retrieve those selected text from a
    normal TextField? For example, I have a multi-line TextField for user to
    enter some text. There is also a Button if user click on it after selected a
    text from the TextField, it will add something in front and after the
    selected text.

    Thank you.

    --
    Soul
     
    Soul, Jan 18, 2004
    #1
    1. Advertising

  2. Re: Retrieve Selected Text from TextField

    Yes, you can do this on the client in javascript. Can be done on the server
    in asp.net ;P

    "Soul" <> wrote in message
    news:O$...
    > Hi,
    >
    > In ASP.Net page, Is there a way to retrieve those selected text from a
    > normal TextField? For example, I have a multi-line TextField for user to
    > enter some text. There is also a Button if user click on it after selected

    a
    > text from the TextField, it will add something in front and after the
    > selected text.
    >
    > Thank you.
    >
    > --
    > Soul
    >
    >
    >
    >
     
    Alessandro Zifiglio, Jan 18, 2004
    #2
    1. Advertising

  3. Soul

    Soul Guest

    Re: Retrieve Selected Text from TextField

    Can you show me how can I do this on server site? I found that the
    SelectedText method only available for TextField in WinForm but not in
    WebForm.

    Thank you.

    --
    Soul


    "Alessandro Zifiglio" <> wrote in
    message news:OlxOb.4753$...
    | Yes, you can do this on the client in javascript. Can be done on the
    server
    | in asp.net ;P
    |
    | "Soul" <> wrote in message
    | news:O$...
    | > Hi,
    | >
    | > In ASP.Net page, Is there a way to retrieve those selected text from a
    | > normal TextField? For example, I have a multi-line TextField for user to
    | > enter some text. There is also a Button if user click on it after
    selected
    | a
    | > text from the TextField, it will add something in front and after the
    | > selected text.
    | >
    | > Thank you.
    | >
    | > --
    | > Soul
    | >
    | >
    | >
    | >
    |
    |
     
    Soul, Jan 19, 2004
    #3
  4. Re: Retrieve Selected Text from TextField

    oops, correction : cannot* be done server side. That was a typo error ;P
    You have to resort to javascript to accomplish what you want ;)

    "Soul" <> wrote in message
    news:%...
    > Can you show me how can I do this on server site? I found that the
    > SelectedText method only available for TextField in WinForm but not in
    > WebForm.
    >
    > Thank you.
    >
    > --
    > Soul
    >
    >
    > "Alessandro Zifiglio" <> wrote in
    > message news:OlxOb.4753$...
    > | Yes, you can do this on the client in javascript. Can be done on the
    > server
    > | in asp.net ;P
    > |
    > | "Soul" <> wrote in message
    > | news:O$...
    > | > Hi,
    > | >
    > | > In ASP.Net page, Is there a way to retrieve those selected text from a
    > | > normal TextField? For example, I have a multi-line TextField for user

    to
    > | > enter some text. There is also a Button if user click on it after
    > selected
    > | a
    > | > text from the TextField, it will add something in front and after the
    > | > selected text.
    > | >
    > | > Thank you.
    > | >
    > | > --
    > | > Soul
    > | >
    > | >
    > | >
    > | >
    > |
    > |
    >
    >
     
    Alessandro Zifiglio, Jan 19, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Soul
    Replies:
    0
    Views:
    415
  2. Willy

    Text in textfield

    Willy, Nov 15, 2006, in forum: HTML
    Replies:
    5
    Views:
    325
    Stan McCann
    Nov 15, 2006
  3. Anthony Papillion

    How to get or set the text of a textfield?

    Anthony Papillion, Jul 11, 2011, in forum: Python
    Replies:
    5
    Views:
    426
    John Gordon
    Jul 11, 2011
  4. domchik
    Replies:
    1
    Views:
    245
    domchik
    Sep 4, 2003
  5. Henry Wiz

    Add text or tag to textfield

    Henry Wiz, Apr 26, 2004, in forum: ASP General
    Replies:
    1
    Views:
    275
    Ray at
    Apr 26, 2004
Loading...

Share This Page