Hi
try this example to Change Textbox Border on focus
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type ="text/javascript">
function Change(obj, evt)
{
if(evt.type=="focus")
obj.style.borderColor="red";
else if(evt.type=="blur")
obj.style.borderColor="black";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" runat="server" onfocus ="Change(this, event)"
onblur ="Change(this, event)"></asp:TextBox>
</form>
</body>
</html>
you can also try this example using CSS
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<style type ="text/css">
.onfocus
{
border-color:red;
}
.onblur
{
border-color:;
}
</style>
<script type ="text/javascript">
function Change(obj, evt)
{
if(evt.type=="focus")
obj.className ="onfocus";
else if(evt.type=="blur")
obj.className ="onblur";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" runat="server" onfocus ="Change(this, event)"
onblur ="Change(this, event)"></asp:TextBox>
</form>
</body>
</html>
Hope this helps
Good Luck