Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Dear All,

Hi. I have 1 project in which I want to different access o different user.
I use dropdown tab. But now i am facing problem that dropdown tab is not enable to more than 1 user i.e. it dropdown for only 1 user not another.

My .ascx page is follows:

<%@ Control Language="C#" %>

<html xmlns="http://www.w3.org/1999/xhtml" >

HTML
<head>
<title>Campaign Management System</title>
</head>
<body>
<table id="Table2" width="160%" border="0" style="removed 10px; removed: absolute; removed -1px">
							
<tr>
<td><!-- #include file="include/top.asp" --></td>
</tr>
<tr>
<td style="display:none;" valign="top" id="Admin">
<!-- #include file="include/Admin.asp" -->
</td>
<td style="display:none;" valign="top" id="HRDakc">
 <!-- #include file="include/HRDakc.asp" -->
</td>
<td style="display:none;" valign="top" id="RegionalHead">
<!-- #include file="include/RegionalHead.asp" -->
</td>
<td style="display:none;" valign="top" id="SaleslHead">
<!-- #include file="include/SaleslHead.asp" -->
</td>
<td style="display:none;" valign="top" id="Guest">
<!-- #include file="include/Guest.asp" -->
</td>
							
</tr>
					        
<script type="text/javascript">
var u ='<%=Session["User"]%>'; 
var m ='<%=Session["UserTypeID"]%>';
if(m=='1' && (u != '' || u != null))
{
								                document.getElementById('Admin').style.display = '';
								                document.getElementById('HRDakc').style.display = 'none';
								                document.getElementById('RegionalHead').style.display = 'none';
								                document.getElementById('SaleslHead').style.display = 'none';
										        document.getElementById('Guest').style.display = 'none';
								                //alert(u + m);								                   
}
else if((u != '' || u != null) && m=='2')
{
								               //alert('hi' + u + m);
								               document.getElementById('Admin').style.display = 'none';
								               document.getElementById('HRDakc').style.display = '';
								               document.getElementById('RegionalHead').style.display = 'none';
								               document.getElementById('SaleslHead').style.display = 'none';
									           document.getElementById('Guest').style.display = 'none';	 
}
else if((u != '' || u != null) && m=='3')
{
								               //alert('hi' + u + m);
								               document.getElementById('Admin').style.display = 'none';
								               document.getElementById('HRDakc').style.display = 'none';
								               document.getElementById('RegionalHead').style.display = '';
								                document.getElementById('SaleslHead').style.display = 'none';
										       document.getElementById('Guest').style.display = 'none'; 
}
 else if((u != '' || u != null) && m=='4')
{
								               //alert('hi' + u + m);
								               document.getElementById('Admin').style.display = 'none';
								               document.getElementById('HRDakc').style.display = 'none';
								               document.getElementById('RegionalHead').style.display = 'none'; 
								               document.getElementById('SaleslHead').style.display = '';
										       document.getElementById('Guest').style.display = 'none';
}	
								            
else if((u != '' || u != null) && m=='5')
{
								               //alert('hi' + u + m);
								               document.getElementById('Admin').style.display = 'none';
								               document.getElementById('HRDakc').style.display = 'none';
								               document.getElementById('RegionalHead').style.display = 'none'; 
								               document.getElementById('SaleslHead').style.display = 'none';
										       document.getElementById('Guest').style.display = '';
}									            
								            
</script>
 </table>
</body>
  </html>

<%----%>


My .aspx page which call .acsx page is

XML
<%@ Register Src="usrheader.ascx" TagName="usrheader" TagPrefix="uc1" %>
<uc1:usrheader ID="Usrheader1" runat="server" />



Please help me.

Thanks & Regards,
Ranjeet waje
Posted
Updated 22-Mar-12 18:58pm
v2
Comments
Sergey Alexandrovich Kryukov 23-Mar-12 0:51am    
Excuse me, what is "dropdown tab"?
--SA
ranjeet.waje 27-Mar-12 0:21am    
hey its a tab in which you can show multiple forms(like in dropdownlist you show multiple values) in your web applications.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900