Home > Net >  Three text boxes A, B, C, A text box C character is made up by A and B, hope in A or B input at the
Three text boxes A, B, C, A text box C character is made up by A and B, hope in A or B input at the

Time:10-08





Now want A or B in the text box input, text box C character automatically generated, one character at A time, each input text at the same time do change
CAs A text box input 123
Text box input ABCDE B
The text box C character is 123 abcde
Is input in A or B, C do change at the same time

CodePudding user response:

Now that is a server-side controls in. Cs file in direct response to the TextChanged event to the C assignment?

CodePudding user response:

With JS
 $(" # A "). The bind (" propertychange ", function () {
$(" # C "). Val ($(" # A "). Val () + $(" # B "). Val ())
});

$(" # B "). The bind (" propertychange ", function () {
$(" # C "). Val ($(" # A "). Val () + $(" # B "). Val ())
});

CodePudding user response:

 & lt; Asp: TextBox ID="A" runat="server" & gt;  



Protect void txtClick (object sender, EventArgs e)
{
This. A.T ext +=((Control) sender). The Text;
}

Handwritten may have access, which means that the meaning,

CodePudding user response:

Events for the TextChanged can,

CodePudding user response:

 & lt; Asp: TextBox ID="A" runat="server" the TextChanged="txtClick & gt;"  



Protect void txtClick (object sender, EventArgs e)
{
Enclosing C.T ext +=((Control) sender). The Text;
}