CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 11/1/2003 12:54:43 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 1345 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
CetiAlphaV
Asp.Net User
Get cursor location in textbox11/1/2003 12:54:43 AM

1

I'm attempting to develop a web control that when you click on a button some text is inserted into a Textbox. What I want to do is insert the text at the location that the cursor was at.

For instance in the textbox I'm typing the following:

Todays Date is _____

At the "____" I want to be able to click on a button to insert the date at the cursor location (which would be at the start of the underscores. This is a simplistic example since I could just append the date to the end of the string, but I want to be able to put the cursor anywhere in the textbox and insert text at that location.

I hope this makes sense. Any ideas would be great, since I'm not sure where to even begin.

Thanks
CetiAlphaV
vintious
Asp.Net User
Re: Get cursor location in textbox11/4/2003 6:33:35 AM

-1

That would be a JavaScript thing. There is a way, but it's messy, and I haven't used it in a while. Basically it stores the cursor location after every click and update of the textbox. Then, using substrings, you can insert text.

Do a Google on "javascript insert text" or something of that sort.
CetiAlphaV
Asp.Net User
Re: Get cursor location in textbox11/4/2003 10:01:57 PM

0

Vintious: Thanks for the reply. You're right kind of messy, but doable.

How would I integrate that Javascript into my .NET control being programmed in C#.

Finally, Has anyone heard of these properties SelStart, SelLength, SelText. They exist for VB Textboxs and ComboBoxes. Would it be possible for me to make a customized Textbox in VB and then use that in my .NET control. If so some pointers on where to begin would be helpful

Thanks
Ceti
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
MASTERING MICROSOFT VISUAL BASIC 2008 Authors: Evangelos Petroutsos, Pages: 1152, Published: 2008
Crystal Reports 10: The Complete Reference Authors: George E. Peck, Pages: 928, Published: 2004
J2ME game programming Authors: Martin J. Wells, Pages: 768, Published: 2004
ADO ActiveX data objects Authors: Jason T. Roff, Pages: 601, Published: 2001
Crystal Reports 2008: The Complete Reference Authors: George Peck, Pages: 968, Published: 2008

Web:
javascript: Get Cursor Position - HTML TextBox : cursor, position ... Hi All, I would like to know if it is possible to get the cursor position within as html textbox. For example, if there is a textbox and the user types in ...
How to detect cursor location and insert text??? C# Friends This is some text in a rich text box.How to get the cursor position in textbox - Webmaster Forums Text Box contain ABCDEFG and let the cursor be at position D. I will press backspace and in onKeyPress event i want to get the postion at D. ...
Inserting string at cursor position in textbox - bytes How do you insert Wrd in textBoxMsg at the cursor position in textBox1? > > Thanks.[/color] Hi, first get the cursor position: ...
How to get Cursor position in Text Box ? My question is How to get Cursor position in Text Box ? I have created a Text Box using if( ISHELL_CreateInstance(pMe->m_pIShell, ...

Get cursor location in textbox - ng.asp-net-forum.windows ... Get cursor location in textbox, > ROOT > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum, Date: 11/1/2003 12:54:43 AM, ...
Microsoft JScript runtime error: Object doesn't support this ... get cursor location in textbox · expert only question...please help me!!! pop3 control · where can i sell my control? web host suggestions ...
commerce starter kit --> commercial website --> help required - ng ... setting validaterequest="false" for an indivual web user control · handle server -to-server call · multiple controls · get cursor location in textbox ...
InitializeComponent - ng.asp-net-forum.windows-hosting_open_forum get cursor location in textbox · composite control, createchildcontrols question · shared hosting... meh. sortedlist viewstate problem ...
Where to find keycode table? - ng.asp-net-forum.windows ... get cursor location in textbox · custom web control · problem populating table · problems with using a datagrid in custom server control ...

Videos:
PowerPoint: Text Episode 6 (of an 18-part series). This Nortel LearniT tutorial explains how to use and format text in your PowerPoint presentation.
PowerPoint: Text Episode 6 (of an 18-part series). This Nortel LearniT tutorial explains how to use and format text in your PowerPoint presentation.
PowerPoint: Text Episode 6 (of an 18-part series). This Nortel LearniT tutorial explains how to use and format text in your PowerPoint presentation.
PowerPoint: Text Episode 6 (of an 18-part series). This Nortel LearniT tutorial explains how to use and format text in your PowerPoint presentation.
PowerPoint: Text Episode 6 (of an 18-part series). This Nortel LearniT tutorial explains how to use and format text in your PowerPoint presentation.






.net hosting

having problems with custom control even firing

when oncomponentchanged event get fired in a custom designer

advise: i have t1 and shared host

control overrides page

designtime and dynamic propertys

custom event in user control call event method by name

video conferencing site

routing table quandry

codebehind of dropdownlist in datalist

building custom controls without visualstudio?

please separate free controls from commercial controls.

writing equations, formulas, mathematics stuff

how to add buttons to custom control

addparsedsubobjects vs other methods for persisting control properties

obtain reference to a usercontrol added to web form at design time

help me..about system.componentmodel.component(how can i get component id)

custom control problem,help!!

accessing a user-control's properties from within another

saving object state over postback

security templates for gpos

postback blues

custom controls and code render blocks

attribute prefix

createchildcontrols

usercontrol at designtime

controlbuilder/parser question

wizards -- does script_path really work???

dedicated asp.net hosting question

datagrid and objectdatasource

   
  Privacy | Contact Us
All Times Are GMT