Hi,
Im not sure if i get you properly. But have a look at this:
code for aspx
<div runat="server" id="MainCategory1" onclick="show(this.id)" >Click here to show more details on this </div>
<div runat="server" id="MainCategory2" onclick="show(this.id)" /> Click here to show more details on this </div>
<div runat="server" id="MainCategory3" onclick="show(this.id)" />Click here to show more details on this </div>
<div runat="server" id="MainCategory4" onclick="show(this.id)" />Click here to show more details on this </div>
<div runat="server" id="MainCategory5" onclick="show(this.id)" />Click here to show more details on this </div>
<div runat="server id="MainCategory1_subcategory" style="visibility: hidden;">write your stuff </div>
<div runat="server id="MainCategory2_subcategory" style="visibility: hidden;">write your stuff </div>
<div runat="server id="MainCategory3_subcategory" style="visibility: hidden;">write your stuff </div>
<div runat="server id="MainCategory4_subcategory" style="visibility: hidden;">write your stuff </div>
<div runat="server id="MainCategory5_subcategory" style="visibility: hidden;">write your stuff </div>
JavaScript
function show(id)
{
var idname= id;
if(idname=="MainCategory1")
document.getElementById('MainCategory1_subcategory').style.visibility='visible';
else if(idname=="MainCategory2")
document.getElementById('MainCategory2_subcategory').style.visibility='visible';
else if(idname=="MainCategory3")
document.getElementById('MainCategory3_subcategory').style.visibility='visible';
}
This is just an outline. PLease let me know if you have any queries
Thanks