[英]How do I implement authentication from a local Active Directory in Blazor Server-Side application?
[英]How do I disable RadButton from server-side?
我的 aspx 文件中有這個按鈕。
<telerik:RadButton ID="btnEnable" OnClick="btnEnable_Click" runat="server" ToolTip="enable"
Text="Enable" Enabled="false" Icon-PrimaryIconUrl="~/images/icon.png">
</telerik:RadButton>
我在客戶端禁用它是這樣的:
btnEnable.set_enabled(false);
我想在我的 aspx.cs 中添加服務器端代碼。 因此,當在網格中選擇項目時,我希望從服務器端禁用此按鈕。
函數看起來像這樣
protected void btnEnable_Click(object sender, EventArgs e)
{
if(someLogic){btnEnable must be disabled}
}
如果有幫助,可以在網格中選擇項目后調用此按鈕。
請記住,您可以添加 ToggleStates:
MyButton.ToggleType = ButtonToggleType.CheckBox;
MyButton.ButtonType = RadButtonType.ToggleButton;
MyButton.ToggleStates.Add("Selected");
MyButton.ToggleStates.Add("Unselected");
MyButton.Checked= false; //set to unselected
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.