Tuesday, July 28, 2009

How to get values to the textbox coninuously from the button cobntrol using .net In javascript using C# lang?

Actually there are nearly 30 butttons when i click the button the corresponding value on it should be displayed in the text box using javascript in asp.net c#....That is the buttons should nearly act like a keyboard and the text box should act like a monitor to display the values....

How to get values to the textbox coninuously from the button cobntrol using .net In javascript using C# lang?
I think the problem is the control name is changed when on client side. You can never refer it by its name when we designed in C#. The solution for it is use document.getElementById(%26lt;%=txtLon.Client... to do the things. So javascript should refer to the control with its ClientId. Like





document.getElementById('%26lt;%=MytxtBox.C... = document.getElementById('%26lt;%=myBotton.Cli...





txtBox.ClientID


btnButton.ClientID

garden state

No comments:

Post a Comment