Hi,
If you use GridView, try this
1. Find TextBox object inside RowDataBound
2. Add attributes with the TextBox object like below code
txtName.Attributes.Add("onclick","javascript:return test();");
<script type="text/javascript">
function test() {
alert("called");
return false;
}
</script>
This is the test code, change the code as per your requirement