当用户角色等于此人时,我想在PageLoad中隐藏Devexpress AspxPopupControl:
protected void Page_Load(object sender, EventArgs e)
{
if (base.User.IsInRole("Person"))
{
popup1.ShowOnPageLoad = false;
popup2.ShowOnPageLoad = false;
}
}
但它不起作用!我怎么能隐藏?我不希望User In Role Person显示popup1和popup2。
答案 0 :(得分:0)
我这样解决了:
aspx
<table>
<tr>
<td id="tdPopup1" runat="server">
popup control
</td></tr></table>
C#
protected void Page_Load(object sender, EventArgs e)
{
if (base.User.IsInRole("Person"))
{
tdPopup1.Visible=false;
}
}