Ask a Question related to ASP.NET General, Design and Development.
-
Harry Simpson #1
Selecting all text in a textbox?
I've got a server-side textbox that receives the focus when the page loads.
It has the text "Refine your Search" in the textbox. Obviously the user
needs to highlight the "Refine your Search" section to replace this with
thier text.
I've googled and found javascript (which doesn't seem to work with the
server side control).
Is there a way to do this with ASPNET??
TIA
Harry
Harry Simpson Guest
-
Problem with selecting text
Hi all- I just created a business card design and went to convert the text to outlines before uploading to my prepress for a quote. I went to... -
Selecting Text Frames
Hello everyone, Is there a way to select all the text frames in a publication so I can change them all at once to Leading instead of Baseline in... -
Selecting text problems
I have a project where I need to copy the text from old PDFs and put them into a word document. Unfortunately, I think the text is actually saved as... -
Having trouble selecting text in Illustrator CS
I'm having trouble selecting text in Illustrator CS. When selecting type with the type tool it selects nearby paths instead. When using the same... -
Highlighting, Underlining, Selecting Text
It seems that I cannot use any of these features in documents I created from my scanner in Adobe Acrobat 5.0. How can I get these to work? Is there a... -
Marc Hoeppner #2
Re: Selecting all text in a textbox?
Hi,
you should be able to use JScript with ASP.NET just fine, in fact you need
JScript to do what you want. What was the problem with the Jscript in
combination with ASP.NET?
Best regards,
Marc Höppner
NeoGeo
"Harry Simpson" <hssimpson@nospamphgt.net> wrote in message
news:OvHWwrRVDHA.3232@tk2msftngp13.phx.gbl...loads.> I've got a server-side textbox that receives the focus when the page> It has the text "Refine your Search" in the textbox. Obviously the user
> needs to highlight the "Refine your Search" section to replace this with
> thier text.
>
> I've googled and found javascript (which doesn't seem to work with the
> server side control).
>
> Is there a way to do this with ASPNET??
>
> TIA
> Harry
>
>
Marc Hoeppner Guest
-
Harry Simpson #3
Re: Selecting all text in a textbox?
Thanks Marc,
I got it working:
Added this to the codebehind load of screen:
txtSearchText.Attributes.Add("onfocus", "SetSelected();")
Then add this to the html of the aspx page:
function SetSelected()
{
document.Form1.txtSearchText.select();
}
Thanks for the reply
Harry
"Marc Hoeppner" <marchoeppner@hotmail.com> wrote in message
news:ey8Kd5RVDHA.2004@TK2MSFTNGP11.phx.gbl...> Hi,
>
> you should be able to use JScript with ASP.NET just fine, in fact you need
> JScript to do what you want. What was the problem with the Jscript in
> combination with ASP.NET?
>
> Best regards,
>
> Marc Höppner
> NeoGeo
>
> "Harry Simpson" <hssimpson@nospamphgt.net> wrote in message
> news:OvHWwrRVDHA.3232@tk2msftngp13.phx.gbl...> loads.> > I've got a server-side textbox that receives the focus when the page>> > It has the text "Refine your Search" in the textbox. Obviously the user
> > needs to highlight the "Refine your Search" section to replace this with
> > thier text.
> >
> > I've googled and found javascript (which doesn't seem to work with the
> > server side control).
> >
> > Is there a way to do this with ASPNET??
> >
> > TIA
> > Harry
> >
> >
>
Harry Simpson Guest
-
Marc Hoeppner #4
Re: Selecting all text in a textbox?
You got it :) - Control.Attributes is kind of hard to find if you don't
already know about it...
"Harry Simpson" <hssimpson@nospamphgt.net> wrote in message
news:%23or69CSVDHA.1816@TK2MSFTNGP09.phx.gbl...need> Thanks Marc,
>
> I got it working:
>
> Added this to the codebehind load of screen:
> txtSearchText.Attributes.Add("onfocus", "SetSelected();")
>
> Then add this to the html of the aspx page:
>
> function SetSelected()
> {
> document.Form1.txtSearchText.select();
> }
>
> Thanks for the reply
> Harry
>
> "Marc Hoeppner" <marchoeppner@hotmail.com> wrote in message
> news:ey8Kd5RVDHA.2004@TK2MSFTNGP11.phx.gbl...> > Hi,
> >
> > you should be able to use JScript with ASP.NET just fine, in fact youuser> > JScript to do what you want. What was the problem with the Jscript in
> > combination with ASP.NET?
> >
> > Best regards,
> >
> > Marc Höppner
> > NeoGeo
> >
> > "Harry Simpson" <hssimpson@nospamphgt.net> wrote in message
> > news:OvHWwrRVDHA.3232@tk2msftngp13.phx.gbl...> > loads.> > > I've got a server-side textbox that receives the focus when the page> > > It has the text "Refine your Search" in the textbox. Obviously thewith> > > needs to highlight the "Refine your Search" section to replace this>> >> > > thier text.
> > >
> > > I've googled and found javascript (which doesn't seem to work with the
> > > server side control).
> > >
> > > Is there a way to do this with ASPNET??
> > >
> > > TIA
> > > Harry
> > >
> > >
> >
>
Marc Hoeppner Guest



Reply With Quote

