本文整理汇总了C#中Button.SetClientId方法的典型用法代码示例。如果您正苦于以下问题:C# Button.SetClientId方法的具体用法?C# Button.SetClientId怎么用?C# Button.SetClientId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button.SetClientId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UxCancelButton
public static MvcHtmlString UxCancelButton(this HtmlHelper helper, ButtonSize size = null, string clientId = null)
{
var button = new Button("Cancel", ButtonCommand.Cancel)
.SetValidation(false)
.SetSize(size);
button.SetClientId(clientId);
return UxButton(helper, button);
}
示例2: UxSaveButton
public static MvcHtmlString UxSaveButton(this HtmlHelper helper, ButtonSize size = null, string clientId = null)
{
var button = new Button("Save", ButtonCommand.Save, ButtonAppearanceType.Success)
.SetIcon(new Icon(IconType.Check))
.SetSize(size);
button.SetClientId(clientId);
return UxButton(helper, button);
}
示例3: UxDeleteButton
public static MvcHtmlString UxDeleteButton(this HtmlHelper helper, ButtonSize size = null, string clientId = null)
{
var button = new Button("Delete", ButtonCommand.Delete)
.SetValidation(false)
.SetIcon(new Icon(IconType.TrashOutlined))
.SetSize(size);
button.SetClientId(clientId);
return UxButton(helper, button);
}
示例4: UxButton
public static MvcHtmlString UxButton(this HtmlHelper helper,
string text,
ButtonAppearanceType appearance = null,
ButtonSize size = null,
IconType iconType = null,
IconPosition position = null,
bool causesValidation = true,
bool disabled = false,
string loadingText = null,
string clientId = null)
{
var button = new Button(text, ButtonCommand.None, appearance)
.SetSize(size)
.SetValidation(causesValidation)
.SetDisabled(disabled)
.SetLoadingText(loadingText);
button.SetClientId(clientId);
if (iconType!=null)
button.SetIcon(new Icon(iconType), position);
return UxButton(helper, button);
}