Solved

Highlight text in textbox the same way the Firefox address bar on click

Posted on 2006-06-17
6
461 Views
Last Modified: 2011-04-14
any ideas?
0
Comment
Question by:addicktz
  • 2
6 Comments
 
LVL 13

Accepted Solution

by:
BlackTigerX earned 250 total points
Comment Utility
on the form load

textBox1.Click+=new EventHandler(textBox1_Click);

then write the event method

            private void textBox1_Click(object sender, EventArgs e) {
                  (sender as TextBox).SelectAll();
            }
0
 
LVL 3

Assisted Solution

by:mistaeverly
mistaeverly earned 250 total points
Comment Utility
Javascript is the way to go... posting back to the server is unnessary and seems pretty ungainly to me.
Try:

<asp:textbox id="mytestbox" runat="sever" onfocus="this.select()"></asp:textbox>

This should be the exact functionality you're looking for.
0
 
LVL 3

Expert Comment

by:mistaeverly
Comment Utility
Betweem BlackTiger and myself, we have given both a Server-side and Client-side solution.  I propose split points.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now