By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,763 Members | 1,609 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,763 IT Pros & Developers. It's quick & easy.

ASP.Net with AJAX Textbox question

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
OJ
On 14 May, 14:59, HockeyFan <les.stock...@gmail.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

P: n/a
On May 14, 9:03 am, OJ <ofe...@gmail.comwrote:
>
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

P: n/a
OJ
On 14 May, 15:23, HockeyFan <les.stock...@gmail.comwrote:
On May 14, 9:03 am, OJ <ofe...@gmail.comwrote:
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

P: n/a
On May 14, 9:51 am, OJ <ofe...@gmail.comwrote:
On 14 May, 15:23, HockeyFan <les.stock...@gmail.comwrote:


On May 14, 9:03 am, OJ <ofe...@gmail.comwrote:
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

P: n/a
OJ
On 14 May, 15:57, HockeyFan <les.stock...@gmail.comwrote:
On May 14, 9:51 am, OJ <ofe...@gmail.comwrote:


On 14 May, 15:23, HockeyFan <les.stock...@gmail.comwrote:
On May 14, 9:03 am, OJ <ofe...@gmail.comwrote:
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

P: n/a
On May 14, 10:02 am, OJ <ofe...@gmail.comwrote:
On 14 May, 15:57, HockeyFan <les.stock...@gmail.comwrote:


On May 14, 9:51 am, OJ <ofe...@gmail.comwrote:
On 14 May, 15:23, HockeyFan <les.stock...@gmail.comwrote:
On May 14, 9:03 am, OJ <ofe...@gmail.comwrote:
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 discussion thread is closed

Replies have been disabled for this discussion.