title: dojo/parser::parse() error TypeError: Cannot read property 'getAttribute' of undefined
body: <p>I am using dojo with .NET webforms for creating popup menu and I am getting below error when I try to load the page.
  "dojo/parser::parse() error TypeError: Cannot read property 'getAttribute' of undefined" </p>
  
  <p>it would be very useful if someone can share a blog on how to use dojo with webforms.
  Below is my code for reference. please check and help me resolve this issue.</p>
  
  <pre><code>&lt;%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="xyz.aspx.cs" Inherits="xyz" %&gt;
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
      &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;link href="../Content/bootstrap.min.css" rel="stylesheet" /&gt;
  &lt;link href="../Content/themes/base/jquery-ui.css" rel="stylesheet" /&gt;
  &lt;link href="../Content/claro.css" rel="stylesheet" /&gt;
  &lt;link href="../Scripts/dojo/resources/dojo.css" rel="stylesheet" /&gt;
  
  &lt;script type="text/javascript" src="../Scripts/jquery-1.12.4.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="../Scripts/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="../Scripts/jquery-ui-1.12.1.js"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="../Scripts/dojo/dojo.js" &gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body class="claro" style="height:100px;width:100px;"&gt;
  
   &lt;div data-dojo-type="dijit/layout/BorderContainer" style="height:100%; width:100%"&gt;
  
          &lt;div data-dojo-type="dijit/layout/ContentPane"
              data-dojo-props="region: 'center'"&gt;
              &lt;div data-dojo-type="dijit/MenuBar"&gt;
                  &lt;div data-dojo-type="dijit/PopupMenuBarItem"&gt;
                      &lt;span&gt;File&lt;/span&gt;
                      &lt;div data-dojo-type="dijit/DropDownMenu"&gt;
                          &lt;div data-dojo-type="dijit/MenuItem"&gt;Open&lt;/div&gt;
                          &lt;div data-dojo-type="dijit/MenuItem"&gt;Save&lt;/div&gt;
                          &lt;div data-dojo-type="dijit/PopupMenuItem"&gt;
                              &lt;span&gt; Recent...&lt;/span&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt; 
          &lt;/div&gt;
      &lt;/div&gt;
  
   &lt;script type="text/javascript"&gt;
  
       document.getElementById("pnlControlList").remove();
       $("#navbar").remove();
  
       require(["dojo/parser"], function (parser) {
           parser.parse();
       });
  
   &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  &lt;/asp:Content&gt; 
  </code></pre>