hello ,
if it is a windows form the textbox has a focus metod .
If it is a web form
write client script block
below is an example
<%@ Page Language="vb" AutoEventWireup ="false" Codebehind="Web Form1.aspx.vb"
Inherits="Clien tSideScriptExam ple.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
<script language="javas cript">
function cmdButton1_Clic ked()
{ document.all('t xtInput1').focu s();
return false;
}
function cmdButton2_Clic ked()
{ document.all('t xtInput2').focu s();
return false;
}
</script>
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
InputBox 1:
<asp:TextBox ID="txtInput1" Runat="server" Width="50" />
<br>
InputBox 2:
<asp:TextBox ID="txtInput2" Runat="server" Width="50" />
<br>
<br>
Click a button to set focus on the specified control:<br>
<input ID="cmdButton1 " type="button" value="InputBox 1"
OnClick="return cmdButton1_Clic ked()">
<input ID="cmdButton2 " type="button" value="InputBox 2"
OnClick="return cmdButton2_Clic ked()">
</form>
</body>
</HTML>
regards
Ansil
Trivandrum
"Hrvoje Voda" wrote:
I would like to when I click radioButton selectFocus on textBox.
How?
Hrcko