Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,


I Have dynamically load All Menu in Master page based on user rights.
Now when i login its check and work fine.
Now i want that only first time Master page load event fire..
Can any one know how can i archive that.


Right now its create problem while published on IIS.
when multiple user access that my site hang not giving response.


Thanks In Advance To All...
Posted
Comments
Shanu2rick 26-Feb-13 4:36am    
Have you tried using IsPostBack property of the Page?
Yatin chauhan 26-Feb-13 4:44am    
yes i have add that too..but its alwys false....
actully me write code on desing page. like

<div class="menus">

<ul>
<%
ApplicationLogic objBAL = new ApplicationLogic();

if (!this.IsPostBack)
{
DataTable dt = objBAL.GetDataForReports("SELECT * FROM DashBoardMenus Where ParentMenuId=0 and isdeleted=0 ORDER BY OrderID");
DataTable dt1;
int TableId = 0;
for (int i = 0; i < dt.Rows.Count; i++)
{
dt1 = objBAL.GetDataForReports("SELECT * FROM DashBoardMenus Where ParentMenuId=" + dt.Rows[i]["MenuID"].ToString() + " and isdeleted=0 ORDER BY OrderID");
Response.Write("<li class='with-submenu'>");
Response.Write("<div class='label'> " + dt.Rows[i]["MenuName"].ToString() + " </div>");
for (int j = 0; j < dt1.Rows.Count; j++)
{
if (Global.IsSuperUser == false)
{
TableId = Convert.ToInt32(dt1.Rows[j]["TableId"].ToString());
if (objBAL.CheckModuleRight(DBOperation.View, CommonInfo.CurrentUserID, TableId))
Response.Write("<ul><li>" + dt1.Rows[j]["MenuName"] + "</li></ul>");
}
else
{
TableId = Convert.ToInt32(dt1.Rows[j]["TableId"].ToString());
Response.Write("<ul><li>" + dt1.Rows[j]["MenuName"] + "</li></ul>");
}
}
Response.Write("</li>");
}
}
%>
</ul>

</div>

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