473,323 Members | 1,589 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

User Control Update

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.
Aug 8 '08 #1
2 983
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
Aug 9 '08 #2
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.

"Munna" wrote:
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
Aug 11 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Luke Ward | last post by:
Hi All I created web user control that has a few properties and an Update method. These controls all get initialised and configured (all properties set) at the page load event. Today I...
1
by: Philip Townsend | last post by:
I have a user control which displays the contents of a shopping cart. I wnat it to update everytime an item is added or deleted from the cart. I have created a button which edits a Session object,...
1
by: Jon | last post by:
Hi, using vb.net/vs 2003/sql server 2000 Working on a shopping cart app. I've got a user control that appears on every page to give a summary of the users shopping cart, eg You have 12 items in...
1
by: Neil | last post by:
Hi, I have an aspx page page with some existing controls code etc. This page has an update button which updates a SQL Db based on any user changes. I need to add a new section to this page and a...
1
by: Winshent | last post by:
How do you update a user control after a button click event. I have a simple shopping basket user control. If a customer updates their basket, then user control should reflect the number of items...
8
by: Mats Lycken | last post by:
Hi, I'm working on a webproject where I have several different user controls loaded on a WebForm. A problem arises when I in one webcontrol makes a change that should be picked up by another user...
3
by: c676228 | last post by:
Hi all, I have an event in user control email to handling email change when user want to change the input for email address. Here it is In email.ascx.vb: Protected Sub UpdateEmail(ByVal sender As...
1
by: Israel | last post by:
The problem: I want to know, definitively when a slider loses focus after a user has started sliding and hasn't released the mouse yet. It appears that this is captured with the WM_ACTIVATEAPP...
1
by: Dave A | last post by:
I have a problem that I have boiled down to a very simple example. I have a user control that displays a some data from a business object. On one screen I have a collection of these business...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.