title: Add a link in one of column while binding data to div using jquery
body: <p>I bring data thorugh <code>json</code> and bind it in a <code>div</code>. Now what I want is, the column is dynamically generated with its data. So there is one column in response whose name is <code>APPLICATIONNAME</code> for which there will be <code>a</code> tag. The link is created with below code.</p>
  <pre><code>&lt;a href=&quot;@Url.Action(&quot;Index/&quot; + SMenu.id, &quot;Application&quot;)&quot; class=&quot;menuCall&quot;&gt;
  </code></pre>
  <p>and my response and its data binding code is below</p>
  <pre><code>success: function (data) {
              var html = '';
  
              if (data == &quot;&quot;) {
                  $(&quot;#dvTable&quot;).html('No Data Found');
              }
  
              else {
                  var rData = JSON.parse(data);
  
                  if (rData.length !== 0) {
  
                      html += '&lt;div class=&quot;table-responsive&quot;&gt;&lt;table class=&quot;table table-blue&quot;&gt;';
  
                      for (var key in rData) {
                          var row = rData[key];
                          if (key == 0) {
                              html += '&lt;tr&gt;';
                              for (var key2 in row) {
                                  html += '&lt;th&gt;';
                                  html += key2;
                                  html += '&lt;/th&gt;';
                              }
                              html += '&lt;/tr&gt;';
                          }
                          html += '&lt;tr&gt;';
                          for (var key2 in row) {
                              html += '&lt;td&gt;';
                              html += row[key2];
                              html += '&lt;/td&gt;';
                          }
                          html += '&lt;/tr&gt;';
                      }
                      html += '&lt;/table&gt;&lt;/div&gt;';
                  }
                  else {
                      html += &quot;No Data Found&quot;;
                  }
  
                  $(&quot;#dvTable&quot;).html(html);
              }
          }
  </code></pre>
  <p>So how should I link and make it clickable.</p>
  <p><strong>JSON Code</strong></p>
  <p><code>APP_MST_ID</code> is SMenu.id which will be used for URL</p>
  <p><strong>UPDATE</strong></p>
  <p>Returning json code from controller.</p>
  <pre><code>public ActionResult GetSearchData(string ddlSelectedVal, string ddlselectParamType, string ddlselectOperator, string txtSearchCntrl)
      {
          string JSONresult = string.Empty;
          SearchComponentBLL srchData = new SearchComponentBLL();
          DataSet DS = new DataSet();
          DS = srchData.GET_FILTER_DATA(ddlSelectedVal, ddlselectParamType, ddlselectOperator, txtSearchCntrl);
          DataTable DT = new DataTable();
          if (DS != null &amp;&amp; DS.Tables.Count &gt; 0)
          {
              DT = DS.Tables[0];
              if (DT != null &amp;&amp; DT.Rows.Count &gt; 0)
              {
                  JSONresult = JsonConvert.SerializeObject(DT);
              }
          }
          return Json(JSONresult, JsonRequestBehavior.AllowGet);
      }
  </code></pre>