Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

Is it possible to call server side function from client side code in asp.net?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon - 29 Apr 2008 03:49 GMT
I heard that we could do that by using AJAX. Could anybody share how to do
it? Thanks.
Steven Cheng [MSFT] - 29 Apr 2008 05:31 GMT
Hi Simon,

For calling server-side function from page client(without postback),
ASP.NET 2.0 standard runtime has provided a feature called client script
callback. It require you to add some code to emit the script reference into
page's client. Here are some reference introducing this:

#Script Callbacks in ASP.NET 2.0
http://www.developer.com/net/asp/article.php/3485991

#Implementing Client Callbacks Programmatically Without Postbacks in
ASP.NET Web Pages
http://msdn2.microsoft.com/en-us/library/ms178208.aspx

Sure, ASP.NET ajax provide a more powerful framework that can help you call
server-side functions( static method in page or webservice) from client
script. If your application is ready to adopt AJAX framework, it's the
preferred choice. Here is a web video tutorial about calling server-side
functions from client:

#How Do I: Make Client-Side Network Callbacks with ASP.NET AJAX?
http://asp.net/learn/ajax-videos/video-79.aspx

you can find more information about ASP.NET ajax on the official site:

http://asp.net/ajax/

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:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

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://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Reply-To: "Simon" <SimonZ@community.nospam>
>From: "Simon" <SimonZ@community.nospam>
>Subject: Is it possible to call server side function from client side code
in asp.net?
>Date: Tue, 29 Apr 2008 10:49:02 +0800

>I heard that we could do that by using AJAX. Could anybody share how to do
>it? Thanks.
Simon - 30 Apr 2008 06:21 GMT
Thanks, I will look into it. The information is good.

> Hi Simon,
>
[quoted text clipped - 66 lines]
>>I heard that we could do that by using AJAX. Could anybody share how to do
>>it? Thanks.
Steven Cheng [MSFT] - 30 Apr 2008 07:08 GMT
Thanks for your reply Simon,

If you have any further questions on this, welcome to post here.

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:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>Reply-To: "Simon" <SimonZ@community.nospam>
>From: "Simon" <SimonZ@community.nospam>
>References: <67DA12E4-36BF-4E9A-80C2-BC23618B190B@microsoft.com>
<#WY6fHbqIHA.1784@TK2MSFTNGHUB02.phx.gbl>
>In-Reply-To: <#WY6fHbqIHA.1784@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Is it possible to call server side function from client side
code in asp.net?
>Date: Wed, 30 Apr 2008 13:21:51 +0800

>Thanks, I will look into it. The information is good.
>
[quoted text clipped - 41 lines]
>> ==================================================
>> Get notification to my posts through email? Please refer to

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>> ications.
>>
[quoted text clipped - 22 lines]
>>>I heard that we could do that by using AJAX. Could anybody share how to do
>>>it? Thanks.
Simon - 30 Apr 2008 06:22 GMT
Thanks, I will look into it. The information is good.

> Hi Simon,
>
[quoted text clipped - 66 lines]
>>I heard that we could do that by using AJAX. Could anybody share how to do
>>it? Thanks.
Simon - 30 Apr 2008 06:22 GMT
Thanks, I will look into it. The information is good.

> Hi Simon,
>
[quoted text clipped - 66 lines]
>>I heard that we could do that by using AJAX. Could anybody share how to do
>>it? Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.