Hi,
How to set the focus in a text box control?I want to blink the cursor in the textbox control while executing...Is there any property for this..?What is the command in ASP.NET using C#..?Thanks in advance...
Gowrishankar 0 Newbie Poster
Recommended Answers
Jump to PostYou would typically do that in the webform1.aspx page with javascript not in the WebForm1.asp.cs C# code-behind.
<script type="text/javascript"> document.forms[0]["TextBox1"].focus(); </script>
You need to put the javascript at the bottom of the aspx, or make as the onload event of the body tag e.g.
…
Jump to Postasp.net will gerenate the javascript for you.
In .NET 2.0 it will yes, but it's yucky IMHO and relies on the client scripts being installed properly in IIS and parent paths. Use it in an isolated project so you can see exactly …
All 7 Replies
hollystyles 113 Veteran Poster
plazmo 1 Posting Whiz in Training
Gowrishankar 0 Newbie Poster
hollystyles 113 Veteran Poster
hollystyles 113 Veteran Poster
plazmo 1 Posting Whiz in Training
nukewarm 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.