PC Review


Reply
Thread Tools Rate Thread

ASP.NET Ajax Client Library

 
 
MAX2006
Guest
Posts: n/a
 
      26th Aug 2008
Hi,

How can I use Client Library to add an event handler to all text boxes
within a page?

I already googled it. A link to an online resource or sample would be a
great help.

Thank you,
Max



 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      26th Aug 2008
jQuery is better at this than the ms ajax library. but its something like:


var nodes = document.getElementsByTagName("INPUT")
foreach (var node in nodes)
{
if (node.type.toUpperCase() == "TEXT")
$addHandler(node,"click",myHandler);
}

-- bruce (sqlwork.com)


"MAX2006" wrote:

> Hi,
>
> How can I use Client Library to add an event handler to all text boxes
> within a page?
>
> I already googled it. A link to an online resource or sample would be a
> great help.
>
> Thank you,
> Max
>
>
>

 
Reply With Quote
 
Steven Cheng [MSFT]
Guest
Posts: n/a
 
      27th Aug 2008
Hi Max,

As Bruce's suggested, what you need to do here is

1. Use javascript to enumerate all the TextBox DOM elements on the page(in
client script):

2. Call ASP.NET ajax "$addhandler" function to register client-side event
handler for each of the enumerated element.

In addition, here are some tutorial and reference links for using
"addhandler" and some of the other AJAX client feature:

#Sys.UI.DomEvent addHandler Method
http://www.asp.net/AJAX/Documentatio....UI/DomEventCl
ass/SysUIDomEventAddHandlerMethod.aspx

#ASP.NET AJAX Control Development
http://dotnetslackers.com/articles/a...velopment.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
>From: "MAX2006" <(E-Mail Removed)>
>Subject: ASP.NET Ajax Client Library
>Date: Tue, 26 Aug 2008 08:38:28 -0400


>
>Hi,
>
>How can I use Client Library to add an event handler to all text boxes
>within a page?
>
>I already googled it. A link to an online resource or sample would be a
>great help.
>
>Thank you,
>Max
>
>
>
>


 
Reply With Quote
 
Steven Cheng [MSFT]
Guest
Posts: n/a
 
      29th Aug 2008
Hi MAX,

Have you got any further ideas or still need any help on this?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(E-Mail Removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

>Content-Transfer-Encoding: 7bit
>From: (E-Mail Removed) (Steven Cheng [MSFT])
>Organization: Microsoft
>Date: Wed, 27 Aug 2008 03:05:30 GMT
>Subject: RE: ASP.NET Ajax Client Library


>Hi Max,
>
>As Bruce's suggested, what you need to do here is
>
>1. Use javascript to enumerate all the TextBox DOM elements on the page(in
>client script):
>
>2. Call ASP.NET ajax "$addhandler" function to register client-side event
>handler for each of the enumerated element.
>
>In addition, here are some tutorial and reference links for using
>"addhandler" and some of the other AJAX client feature:
>
>#Sys.UI.DomEvent addHandler Method
>http://www.asp.net/AJAX/Documentatio...s.UI/DomEventC

l
>ass/SysUIDomEventAddHandlerMethod.aspx
>
>#ASP.NET AJAX Control Development
>http://dotnetslackers.com/articles/a...velopment.aspx
>
>Sincerely,
>
>Steven Cheng
>
>Microsoft MSDN Online Support Lead
>
>
>Delighting our customers is our #1 priority. We welcome your comments and
>suggestions about how we can improve the support we provide to you. Please
>feel free to let my manager know what you think of the level of service
>provided. You can send feedback directly to my manager at:
>(E-Mail Removed).
>
>==================================================
>Get notification to my posts through email? Please refer to
>http://msdn.microsoft.com/en-us/subs...#notifications.
>
>Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
>where an initial response from the community or a Microsoft Support
>Engineer within 1 business day is acceptable. Please note that each follow
>up response may take approximately 2 business days as the support
>professional working with you may need further investigation to reach the
>most efficient resolution. The offering is not appropriate for situations
>that require urgent, real-time or phone-based interactions or complex
>project analysis and dump analysis issues. Issues of this nature are best
>handled working with a dedicated Microsoft Support Engineer by contacting
>Microsoft Customer Support Services (CSS) at
>http://support.microsoft.com/select/...tance&ln=en-us

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax Library Question Scott M. Microsoft ASP .NET 2 18th Mar 2009 02:40 PM
Enterprise Library and ASP.NET AJAX =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= Microsoft ASP .NET 0 14th Nov 2007 02:43 PM
ASP.NET and AJAX: JavaScript files from the Microsoft AJAX Library Nathan Sokalski Microsoft ASP .NET 2 2nd Jun 2007 01:07 AM
[Ann] Yet another Ajax Widgets library... Thomas Hansen Microsoft Dot NET Framework 0 23rd Jan 2007 06:24 PM
Which AJAX library to use? Showjumper Microsoft ASP .NET 10 11th Nov 2005 08:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:25 AM.