[英]How to hide AspxPopupControl in Page Load?
當 User Role 等於 Person 時,我想在 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 。
我是這樣解決的:
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;
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.