use this script in header section :-
--------------------------------
<script type="text/javascript">
function ToUpper(txt) {
document.getElementById(txt).value = document.getElementById(txt).value.toUpperCase();
}
</script>
Take a textbox like this and call the java script function over here. :-
-------------------------------------------------------------------
<asp:TextBox ID="txtCode" runat="server" AutoPostBack="True"
ontextchanged="txtCode_TextChanged" MaxLength="99" onkeypress="ToUpper(this.id)" onblur="ToUpper(this.id)"></asp:TextBox>
--------------------------------
<script type="text/javascript">
function ToUpper(txt) {
document.getElementById(txt).value = document.getElementById(txt).value.toUpperCase();
}
</script>
Take a textbox like this and call the java script function over here. :-
-------------------------------------------------------------------
<asp:TextBox ID="txtCode" runat="server" AutoPostBack="True"
ontextchanged="txtCode_TextChanged" MaxLength="99" onkeypress="ToUpper(this.id)" onblur="ToUpper(this.id)"></asp:TextBox>
No comments:
Post a Comment