That is a nice trick to make a TextBox a read-only TextBox:
<asp:TextBox id="txtID" runat="server" onkeydown="return ProtectBox(event);" />
<script language="javascript">
<!--
function ProtectBox(e)
{
return false;
}
//-->
</script>
This way, the user won't be able to write anything in the TextBox!!
Hope you liked it!
Regards
Tags: