Click here to Skip to main content
13,193,551 members (39,099 online)
Click here to Skip to main content


49 bookmarked
Posted 6 Jul 2007

Events Between Web Forms

, 6 Jul 2007
Raise Events Between Web Forms Using CallBacks or Ajax
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="CallBacks._Default" %>

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

<html xmlns="" >
<head runat="server">
    <title>Untitled Page</title>
     <script type="text/javascript">
       //Open the add new user window
        function AddNewUser()
        //Open the add new user window
        function AddNewUserAjax()
        //Receive some data from the child window
        function UserAddedEvent(result)
            //Message about the Last User Added
            document.getElementById("UserAdded").innerHTML = result;
             //Reload the user list
        //Reloads the User list with a callback
        function ReloadUserList()
            //Make the callback to the server
            CallServer("", "");
        //Receives the CallBack Result
        function ReceiveCallBackResult(result)
            //Inform the user
            document.getElementById("UsersTable").innerHTML = result;
    <form id="form1" runat="server" enctype="multipart/form-data">
    <div id="UsersTable">
        <% = ShowTheData()%></div>
        <input id="Add_New_User" type="button" value="Add User"  onclick ="AddNewUser();"/>
        <input id="Add_New_User_Ajax" type="button" value="Add User Ajax"  onclick ="AddNewUserAjax();"/>
        <br />
        <span id="UserAdded" runat="server"></span>

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
Mexico Mexico
I am Pedro Ramirez from mexico, work for, the company is located in Mexico, we do outsourcing and nearshore development, we are focused on SaaS nearshore development, I started with VB.Net, but now I am ambidextrous using VB.Net or C#.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171018.2 | Last Updated 6 Jul 2007
Article Copyright 2007 by Pramirez
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid