Click here to Skip to main content
12,956,606 members (57,936 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads


71 bookmarked
Posted 24 May 2006

Client Callbacks in ASP.NET 2.0

, 24 May 2006 CPOL
Explains the concept of client callbacks in ASP.NET 2.0.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="params.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" >
<head runat="server">
    <title>Untitled Page</title>
 <script type="text/javascript">
    function GetMessageFromServer() 
        var number = document.forms[0].TextBox1.value;
        UseCallBack(number, "");
    function JSCallback(TextBox2, context)
        document.forms[0].TextBox2.value = TextBox2;
    <form id="form1" runat="server">
        Enter Number<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
        <input type=button ID="Button1" runat="server" value="Calculate Square" onclick="GetMessageFromServer()" />
        <br />
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox></div>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
United Arab Emirates United Arab Emirates
Iam Nasir Ali Khan, working a software architect in Dubai, works primarily on Microsoft Platform, MCTS certified for windows/web/distributed/mobile/enterprise applications.
Also teaches CS courses in a university in dubai.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170525.1 | Last Updated 25 May 2006
Article Copyright 2006 by NasirAliKhan
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid