Here is sample example In which we will fill textbox txt3 using txt1 and txt2
<script type="text/javascript" >
function AutoFill()
{
var src1 = document.getElementById('<%=txt1.ClientID%>').value;
var src2 = document.getElementById('<%=txt2.ClientID%>').value;
document.getElementById('<%=txt3.ClientID%>').value = src1+' '+src2;
}
</script>
<asp:TextBox ID="txt1" runat="server" onchange="AutoFill()"></asp:TextBox><br />
<asp:TextBox ID="txt2" runat="server" onchange="AutoFill()"></asp:TextBox>
<asp:TextBox ID="txt3" runat="server"></asp:TextBox>
No comments:
Post a Comment