title: Unable to do javascript onclick event
body: <p>I have loop in c#, the looped contents I am  storing in string.</p>
  
  <pre><code>foreach (DataRow drModuleId in dtModuleId.Rows)
  {
       strModuleIdHtml = strModuleIdHtml + "&lt;div class='col-md-2 text-center MainModule'&gt;&lt;span class='" + drModuleId["FONTAWESOMECLASS"].ToString() + "' style='font-size:35px;'&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style='font-size:16px;'&gt;" + drModuleId["TXTLONG"].ToString() + "&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;" +
                         "&lt;div class='text-center'&gt;&lt;span class='spanOpen' onclick=" + "jsPopulateControlBoardDetail('" + drModuleId["MODULEID"].ToString() + "'"+","+"'"+ drModuleId["TXTLONG"].ToString() +"')&gt;Open&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;";
  }
  
  ScriptManager.RegisterStartupScript(Page, this.GetType(), "Key", "&lt;script&gt; jsPopulateModuleId(" + '"' + strModuleIdHtml + '"' + ") &lt;/script&gt;", false);
  </code></pre>
  
  <p>When i run the above code, following html controls will be generated.</p>
  
  <pre><code>&lt;div class='col-md-2 text-center MainModule'&gt;
          &lt;span class='fas fa-tools' style='font-size:35px;'&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
          &lt;span style='font-size:16px;'&gt;Common Setting&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
          &lt;div class='text-center'&gt;
              &lt;span class='spanOpen' onclick=jsPopulateControlBoardDetail('12EA','FIRST')&gt;Open&lt;/span&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class='col-md-2 text-center MainModule'&gt;
          &lt;span class='fas fa-sliders-h' style='font-size:35px;'&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
          &lt;span style='font-size:16px;'&gt;Default Setting&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;
          &lt;div class='text-center'&gt;
              &lt;span class='spanOpen' onclick=jsPopulateControlBoardDetail('74PL','SECOND')&gt;Open&lt;/span&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  </code></pre>
  
  <p>After the html control generation, when I click on Open I am getting JavaScript syntax error. Not able to recognize where I am missing. this works fine when I pass only one parameter, but it fails with two parameter. Can anyone help me </p>