User Control Update

M

Madison

Hi there,
I'm using asp.net framework3.5. I would like to create ascx control with 3
textbox with currency type. Users will enter number to textbox1 and textbox2
then textbox3 will show result of textbox1 + textbox2. I do not to post back
to refresh the result every time users change the number. I try with
javascript but when I call the control from aspx page, the javascript will
not working. This control will use in any pages that why I want to create as
control. I could done the same thing in the aspx page everything work nicely.
Any idea or other option to be easy future maintenance.
Thanks.
 
M

Munna

Hi,

Few things you might take a look... the client id of the textbox will
defer when you put the textbox in page to usercontrol.
Design the javascript in such a way so that when it rendered in the
browser the script get the correct id.

otherwise all should go okay...


best of luck

Munna
 
M

Madison

Thank you Munna for your reply.

I used Javascritp with document.getElementById("myid").value but it could
not find the id. I have tried in ascx page load and have
myid.Attributes("onBlur") = "javascript:TotalAmount();" All this code will
work if I put them in the aspx page without using ascx control.
I start to look at AJAX but it's so new to me. I don't really know that AJAX
will work with this.

Thank you again for your advise.
 

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

Top