Sorry if this is a very simple question for you folks.

I have a master form and a content form.

I want to create an element (p) and add some text to it and display it on the content form (not on the master form). With the current code, it always displays on the Master form. I want it to display the newly created p element on the master form.

This is how the content form looks like:

Content Form:

<%@ Page Title="" Language="C#" MasterPageFile="~/QRMDMS.Master" AutoEventWireup="true" CodeBehind="Javascript_CreatingAndAddingElementsInForLoop.aspx.cs" Inherits="FHLBSF.QRMDMS.WebUI.Javascript_CreatingAndAddingElementsInForLoop" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <script type="text/javascript" language="javascript">

        var varPelement = document.createElement("p");
        varPelement.appendChild(document.createTextNode("Hello Basam"));
Master Form:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="QRMDMS.master.cs" Inherits="WebUI.DMS" %>

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

<html xmlns="" >
<head runat="server">

    <asp:ContentPlaceHolder ID="head" runat="server">
    <form id="form1" runat="server">
     <table width="100%" class="maintable">
            <td class="style6"  valign="top" bgcolor="PapayaWhip">
                 <asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" 
                     ImageSet="Arrows" Font-Bold="False" Font-Names="Courier New" 
                     ForeColor="Black" border="solid dimgray">
                     <SelectedNodeStyle BorderStyle="Dotted" />
                <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
            <td class="style5"  valign="top">
                <asp:ContentPlaceHolder ID="MainContentPlaceHolder" runat="server">