---
title: "Adding multiple user controls in table"  
description: "Adding multiple user controls in table"  
author: "Anonymous User"  
published: 2014-08-21  
updated: 2014-08-21  
canonical: https://www.mindstick.com/forum/2064/adding-multiple-user-controls-in-table  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Adding multiple user controls in table

I'm [trying](https://answers.mindstick.com/qa/93698/6-mistakes-couples-are-trying-to-save-money) to put [multiple](https://www.mindstick.com/blog/12797/iowa-is-expected-to-see-heavy-growth-in-multiple-sectors) [user controls](https://www.mindstick.com/forum/343/logon-and-logoff-user-controls-how-to-set-isauthenticated-is-true) on the dashboard. But only one [user control](https://www.mindstick.com/forum/294/problem-in-access-the-control-inside-the-user-control) is visible.

## Dashboard.aspx:

```
<table cellpadding="0" cellspacing="0" border="0" width="220px"><tr><td><dc:MyControl ID="c1" runat="server"/></td><td><dc:MyControl ID="c2" runat="server"/></td></tr></table>
```

It looked like the [global](https://www.mindstick.com/articles/13127/macro-and-microeconomics-concepts-in-relation-to-global-organization-management) object created in user control overwrites the other one.

I then changed my [javascript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript) [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) as:

## MyControl.ascx:

```
//Display gauge on the page (has some html5 elements like
canvas)<div id="gauge1"
class="gauge"></div><script type="text/javascript">var <%=this.ClientID%>global = new jGauge(); // Create
a new gauge.<%=this.ClientID%>global.id = 'gauge1'; // Link the
new gauge to the placeholder DIV.// This function is called by jQuery once the page has
finished loading.$(document).ready(function () {<%=this.ClientID%>global.init(); // Put the gauge on
the page by initializing it.});</script>
```

But still only one user control is visible. Any suggestions?

## Replies

### Reply by Sumit Kesarwani

Hi Ankit, try this:\

<table cellpadding="0" cellspacing="0" border="0" width="100%">

<tr>

<td style="width:50%;">

<dc:MyControl ID="c1" runat="server"/>

</td>

<td style="width:50%;">

<dc:MyControl ID="c2" runat="server"/>

</td>

</tr>


---

Original Source: https://www.mindstick.com/forum/2064/adding-multiple-user-controls-in-table

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
