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

Discussion in 'ASP .Net' started by Simon, Apr 29, 2008.

  1. Simon

    Simon Guest

    I heard that we could do that by using AJAX. Could anybody share how to do
    it? Thanks.
    Simon, Apr 29, 2008
    #1
    1. Advertising

  2. 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:
    .

    ==================================================
    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" <>
    >From: "Simon" <>
    >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.
    >
    >
    Steven Cheng [MSFT], Apr 29, 2008
    #2
    1. Advertising

  3. Simon

    Simon Guest

    Thanks, I will look into it. The information is good.


    "Steven Cheng [MSFT]" <> wrote in message
    news:%...
    > 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:
    > .
    >
    > ==================================================
    > 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" <>
    >>From: "Simon" <>
    >>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, Apr 30, 2008
    #3
  4. Simon

    Simon Guest

    Thanks, I will look into it. The information is good.


    "Steven Cheng [MSFT]" <> wrote in message
    news:%...
    > 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:
    > .
    >
    > ==================================================
    > 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" <>
    >>From: "Simon" <>
    >>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, Apr 30, 2008
    #4
  5. Simon

    Simon Guest

    Thanks, I will look into it. The information is good.


    "Steven Cheng [MSFT]" <> wrote in message
    news:%...
    > 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:
    > .
    >
    > ==================================================
    > 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" <>
    >>From: "Simon" <>
    >>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, Apr 30, 2008
    #5
  6. 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:
    .

    ==================================================
    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" <>
    >From: "Simon" <>
    >References: <>

    <#>
    >In-Reply-To: <#>
    >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.
    >
    >
    >"Steven Cheng [MSFT]" <> wrote in message
    >news:%...
    >> 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:
    >> .
    >>
    >> ==================================================
    >> 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" <>
    >>>From: "Simon" <>
    >>>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.
    >>>
    >>>

    >>

    >
    >
    Steven Cheng [MSFT], Apr 30, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    2
    Views:
    556
  2. Borr
    Replies:
    2
    Views:
    6,224
    Alvin Bruney
    Nov 10, 2003
  3. nick
    Replies:
    3
    Views:
    3,170
    Eliyahu Goldin
    Dec 15, 2004
  4. aa
    Replies:
    6
    Views:
    393
    Jeff @ Dart
    Mar 8, 2005
  5. =?Utf-8?B?bGFuZW0=?=
    Replies:
    3
    Views:
    29,273
    Eliyahu Goldin
    Mar 30, 2005
Loading...

Share This Page