Programatically setting the asp:textbox

S

sarj

Hi....

I have a asp:textbox whose text needs to be set when a
radio button is clicked. The text would correspond to the
value of the particular.

However, although the text is correctly set in code, it is
not reflected in the asp:textbox control. The control
still shows a blank asp:textbox. The radio button is of
type <input type="radio"> and not asp:RadioButton. I
cannot use the asp:RadioButton as I cannot assign an
OnClick handler to it.

Any assistance on this is much appreciated.

Cheers,
Dinesh
 
J

jagadeesh

The way yo need to do is
write a function that will be called on click of radio button. Put the
text(this.value in your case) to be populated as an argument to that
function.
use it in populating the text in the same way you do for a normal text box.
You can use the ASP:radiobutton also. To have client side support for
methods, use attributes.add method.
More help is available in MSDN on the same
Jagadeesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top