473,569 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.Net with AJAX Textbox question

I'd like to have an AJAX textbox that after the user fills in, will
auto-fill another textbox on the page without having a postback
occur. It doesn't have to do any filtering or any other thing like
that. I'm fairly experienced with ASP.Net, but new to AJAX. Please
help if you can. Thanx.

May 14 '07 #1
6 3996
OJ
On 14 May, 14:59, HockeyFan <les.stock...@g mail.comwrote:
I'd like to have an AJAX textbox that after the user fills in, will
auto-fill another textbox on the page without having a postback
occur. It doesn't have to do any filtering or any other thing like
that. I'm fairly experienced with ASP.Net, but new to AJAX. Please
help if you can. Thanx.
Hi,
if you don't want a postback then don't use AJAX. The effect you are
looking for can be achieved through client Javascript if you want to
avoid a postback. On the other hand, if you are only looking to do a
PARTIAL postback, then use an AJAX updatepanel and the Trigger
functionality.. ..I guess it depends on where the data for the 2nd
textbox is originating...

Hth,
OJ

May 14 '07 #2
On May 14, 9:03 am, OJ <ofe...@gmail.c omwrote:
>
Hi,
if you don't want a postback then don't use AJAX. The effect you are
looking for can be achieved through client Javascript if you want to
avoid a postback. On the other hand, if you are only looking to do a
PARTIAL postback, then use an AJAX updatepanel and the Trigger
functionality.. ..I guess it depends on where the data for the 2nd
textbox is originating...

Hth,
OJ
I thought the whole point of AJAX was client-side javascript. Am I
wrong about that? If so, then what is AJAX really and how does it
different from ASP.Net?

May 14 '07 #3
OJ
On 14 May, 15:23, HockeyFan <les.stock...@g mail.comwrote:
On May 14, 9:03 am, OJ <ofe...@gmail.c omwrote:
Hi,
if you don't want a postback then don't use AJAX. The effect you are
looking for can be achieved through client Javascript if you want to
avoid a postback. On the other hand, if you are only looking to do a
PARTIAL postback, then use an AJAX updatepanel and the Trigger
functionality.. ..I guess it depends on where the data for the 2nd
textbox is originating...
Hth,
OJ

I thought the whole point of AJAX was client-side javascript. Am I
wrong about that? If so, then what is AJAX really and how does it
different from ASP.Net?
hi,
yeah...it uses client side scripting to enable partial page postbacks
and partial page rendering. It stands for Asynchronous Java with XML.
If you don't want/need to postback to the server for information for
the second Textbox then you only need the "Java" bit of AJAX. If you
need data from the server you need the Async...with XML" bit!!

Basically, is the info you need for the 2nd textbox originating from
the server? If so, then use the AJAX updatepanel. If the information
is not on the server (for instance, it is calculated based on the
entry in the 1st textbox, then this can be done entirely client side
using Javascript only, hence no postback to the server). I hope this
is a bit clearer..

Regards,
Oliver

May 14 '07 #4
On May 14, 9:51 am, OJ <ofe...@gmail.c omwrote:
On 14 May, 15:23, HockeyFan <les.stock...@g mail.comwrote:


On May 14, 9:03 am, OJ <ofe...@gmail.c omwrote:
Hi,
if you don't want a postback then don't use AJAX. The effect you are
looking for can be achieved through client Javascript if you want to
avoid a postback. On the other hand, if you are only looking to do a
PARTIAL postback, then use an AJAX updatepanel and the Trigger
functionality.. ..I guess it depends on where the data for the 2nd
textbox is originating...
Hth,
OJ
I thought the whole point of AJAX was client-side javascript. Am I
wrong about that? If so, then what is AJAX really and how does it
different from ASP.Net?

hi,
yeah...it uses client side scripting to enable partial page postbacks
and partial page rendering. It stands for Asynchronous Java with XML.
If you don't want/need to postback to the server for information for
the second Textbox then you only need the "Java" bit of AJAX. If you
need data from the server you need the Async...with XML" bit!!

Basically, is the info you need for the 2nd textbox originating from
the server? If so, then use the AJAX updatepanel. If the information
is not on the server (for instance, it is calculated based on the
entry in the 1st textbox, then this can be done entirely client side
using Javascript only, hence no postback to the server). I hope this
is a bit clearer..

Regards,
Oliver- Hide quoted text -

- Show quoted text -

Client-side only:
So if I can do it with Javascript, what do I put in my textbox control
to tell it to run the javascript? Is there any OnChange event or what
will I be hoping to invoke the javascript with from inside the
Asp:Textbox control?
May 14 '07 #5
OJ
On 14 May, 15:57, HockeyFan <les.stock...@g mail.comwrote:
On May 14, 9:51 am, OJ <ofe...@gmail.c omwrote:


On 14 May, 15:23, HockeyFan <les.stock...@g mail.comwrote:
On May 14, 9:03 am, OJ <ofe...@gmail.c omwrote:
Hi,
if you don't want a postback then don't use AJAX. The effect you are
looking for can be achieved through client Javascript if you want to
avoid a postback. On the other hand, if you are only looking to do a
PARTIAL postback, then use an AJAX updatepanel and the Trigger
functionality.. ..I guess it depends on where the data for the 2nd
textbox is originating...
Hth,
OJ
I thought the whole point of AJAX was client-side javascript. Am I
wrong about that? If so, then what is AJAX really and how does it
different from ASP.Net?
hi,
yeah...it uses client side scripting to enable partial page postbacks
and partial page rendering. It stands for Asynchronous Java with XML.
If you don't want/need to postback to the server for information for
the second Textbox then you only need the "Java" bit of AJAX. If you
need data from the server you need the Async...with XML" bit!!
Basically, is the info you need for the 2nd textbox originating from
the server? If so, then use the AJAX updatepanel. If the information
is not on the server (for instance, it is calculated based on the
entry in the 1st textbox, then this can be done entirely client side
using Javascript only, hence no postback to the server). I hope this
is a bit clearer..
Regards,
Oliver- Hide quoted text -
- Show quoted text -

Client-side only:
So if I can do it with Javascript, what do I put in my textbox control
to tell it to run the javascript? Is there any OnChange event or what
will I be hoping to invoke the javascript with from inside the
Asp:Textbox control?- Hide quoted text -

- Show quoted text -
Hi,
(depending on the client browsers Javascript support) There are
javascript events for all html controls....

have a look here to get you started...

http://www.w3.org/TR/html4/interact/scripts.html

Like I said though, it really depends on what you want in your 2nd
textbox and how you want to get it. Perhaps if you expand on this a
bit more I can give you a more relevant response..
Regards,
OJ

May 14 '07 #6
On May 14, 10:02 am, OJ <ofe...@gmail.c omwrote:
On 14 May, 15:57, HockeyFan <les.stock...@g mail.comwrote:


On May 14, 9:51 am, OJ <ofe...@gmail.c omwrote:
On 14 May, 15:23, HockeyFan <les.stock...@g mail.comwrote:
On May 14, 9:03 am, OJ <ofe...@gmail.c omwrote:
Hi,
if you don't want a postback then don't use AJAX. The effect you are
looking for can be achieved through client Javascript if you want to
avoid a postback. On the other hand, if you are only looking to do a
PARTIAL postback, then use an AJAX updatepanel and the Trigger
functionality.. ..I guess it depends on where the data for the 2nd
textbox is originating...
Hth,
OJ
I thought the whole point of AJAX was client-side javascript. Am I
wrong about that? If so, then what is AJAX really and how does it
different from ASP.Net?
hi,
yeah...it uses client side scripting to enable partial page postbacks
and partial page rendering. It stands for Asynchronous Java with XML.
If you don't want/need to postback to the server for information for
the second Textbox then you only need the "Java" bit of AJAX. If you
need data from the server you need the Async...with XML" bit!!
Basically, is the info you need for the 2nd textbox originating from
the server? If so, then use the AJAX updatepanel. If the information
is not on the server (for instance, it is calculated based on the
entry in the 1st textbox, then this can be done entirely client side
using Javascript only, hence no postback to the server). I hope this
is a bit clearer..
Regards,
Oliver- Hide quoted text -
- Show quoted text -
Client-side only:
So if I can do it with Javascript, what do I put in my textbox control
to tell it to run the javascript? Is there any OnChange event or what
will I be hoping to invoke the javascript with from inside the
Asp:Textbox control?- Hide quoted text -
- Show quoted text -

Hi,
(depending on the client browsers Javascript support) There are
javascript events for all html controls....

have a look here to get you started...

http://www.w3.org/TR/html4/interact/scripts.html

Like I said though, it really depends on what you want in your 2nd
textbox and how you want to get it. Perhaps if you expand on this a
bit more I can give you a more relevant response..

Regards,
OJ- Hide quoted text -

- Show quoted text -
The user types something in the first textbox. I'd like that copied
to the second, but the user can change the second if they want. One
is a name field. The second is a legal name field.

May 14 '07 #7

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

Similar topics

4
2529
by: Rob Meade | last post by:
Hi all, I played with my first bit of AJAX the other week and was pleasantly surprised that I achieved my goal..now I'd like to try something else.. Question... If I have an updatePanel, and lets say I have a button as a trigger which runs a function in my code behind to add a textbox to the updatePanel, when the form is submitted does...
4
8729
by: Grant Merwitz | last post by:
Hi I am trying to implement the Microsoft Ajax.NET extensions to perform a lookup on a key press of a text box. What this will do is once a user enters a letter into the textbox, this will filter a list from a database and populate some filtered options for the user to choose in a seperate listbox. Any subsequent key presses will further...
2
2198
by: =?Utf-8?B?VG9u?= | last post by:
Hello, I want to understand teh benefits of ajax technology. Does anyone has a good website where AJAX EXTENSIONS is worked out so I really understand it. There a 2 main questions: 1) How about the form load event. Why should it fire when I put a button in a update panel? Is this necessary and is only the other controls related to the...
4
1114
by: davidson1 | last post by:
Hai friends, I am doing project in ASP.NET(vb) , I have Installed the software Microsoft ASP.NET 2.0 AJAX Extensions My Question is I have 2 Textbox Regno:- Textbox1 Name :- Textbox2
2
3333
by: =?Utf-8?B?Q2hyaXMgRmluaw==?= | last post by:
I have a general question regarding VS2008 and Ajax Toolkit 3.5. Currently I have a dropdownlist populated from the database. When the user selects and item, the OnSelectedIndexChanged event fires (does a postback to the server) and then loads the selected item's value into an asp:textbox control. Using the Ajax toolkit, I'd like to...
3
1724
by: Cirene | last post by:
I have a simple page - 2 dropdowns, 2 textboxes. 1 set of dropdown/textbox is in the updatepanel. 1 set of dropdown/textbox is not. When I select a dropdown the textbox is updated with teh value. Why is it that the updatepanel one still seems to "flicker" on postback? I would think that because I have it in an updatepanel taht it...
4
5348
by: Peter | last post by:
ASP.NET I have an application which use ASP.NET Autocomplete extender which works great. But I have a question how to update all the fields on the screen using Ajax. Users starts typing in a text field which causes the Autocomplete extender to display 10 like items, after the users selects an item (which is a key in the database) I want...
8
3131
by: cyqotiq | last post by:
First, let me state that this is not necessarily a Firefox problem, as I haven't fully tested in IE just yet. Second, let me state that this is not the typical "getElementById not working Firefox" post. Third, there are pieces of this code that I am not at liberty to display, change, discuss, or re-implement. As far as this question is...
3
1474
by: SAL | last post by:
Hello, I'm using vs2005 and ajax exentions 1.0.61025.0. I have a page with a Gridview control that's inside of an update panel. I also have a DetailsView on this page inside of another update panel. The Detailsview handles the inserting of records into the Gridview. The page is behaving as expected except the ItemInserting event (and there...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7673
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.