本文整理汇总了C#中System.Web.UI.HtmlControls.HtmlInputButton类的典型用法代码示例。如果您正苦于以下问题:C# HtmlInputButton类的具体用法?C# HtmlInputButton怎么用?C# HtmlInputButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HtmlInputButton类属于System.Web.UI.HtmlControls命名空间,在下文中一共展示了HtmlInputButton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddActions
private void AddActions(HtmlGenericControl container)
{
using (HtmlGenericControl actions = new HtmlGenericControl("div"))
{
actions.Attributes.Add("class", "actions");
using (HtmlGenericControl buttons = new HtmlGenericControl("div"))
{
buttons.Attributes.Add("class", "ui buttons");
using (HtmlInputButton cancelButton = new HtmlInputButton())
{
cancelButton.Attributes.Add("class", "ui red button");
cancelButton.Value = Titles.Cancel;
buttons.Controls.Add(cancelButton);
}
using (HtmlInputButton verifyButton = new HtmlInputButton())
{
verifyButton.ID = "VerifyButton";
verifyButton.Attributes.Add("class", "ui green button");
verifyButton.Value = Titles.Verify;
verifyButton.Attributes.Add("title", "CTRL + RETURN");
buttons.Controls.Add(verifyButton);
}
actions.Controls.Add(buttons);
}
container.Controls.Add(actions);
}
}
示例2: buttonStyleWhite
public void buttonStyleWhite(HtmlInputButton button, string message)
{
button.Visible = true;
button.Style.Add("background-color", "white");
button.Style.Add("color", "red");
button.Value = message;
}
示例3: Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
System.Web.UI.HtmlControls.HtmlForm frm = (HtmlForm)FindControl("Form1");
GHTTestBegin(frm);
//False
GHTSubTestBegin("Causes validation = false");
try
{
System.Web.UI.HtmlControls.HtmlInputButton btn = new System.Web.UI.HtmlControls.HtmlInputButton();
btn.CausesValidation = false;
GHTActiveSubTest.Controls.Add(btn);
}
catch (Exception ex)
{
GHTSubTestUnexpectedExceptionCaught(ex);
}
//true
GHTSubTestBegin("Causes validation = true");
try
{
System.Web.UI.HtmlControls.HtmlInputButton btn = new System.Web.UI.HtmlControls.HtmlInputButton();
btn.CausesValidation = true;
GHTActiveSubTest.Controls.Add(btn);
}
catch (Exception ex)
{
GHTSubTestUnexpectedExceptionCaught(ex);
}
GHTTestEnd();
}
示例4: CreateChildControls
protected override void CreateChildControls()
{
Page.ClientScript.RegisterClientScriptBlock(GetType(), "ShowLocationSelectionDialog", CreateShowDialogScript());
if (ValueControl == null)
CreateValueControl();
DisplayControl = new TextBox();
DisplayControl.ID = "Display";
DisplayControl.Enabled = false;
CopyWebAttributes(DisplayControl);
Controls.Add(DisplayControl);
HtmlInputButton openDialogButton = new HtmlInputButton();
if (!Enabled)
openDialogButton.Attributes.Add("disabled", "disabled");
openDialogButton.Value = "...";
openDialogButton.Attributes.Add("class", "epismallbutton");
openDialogButton.Attributes.Add("onclick", string.Format(
"ShowLocationSelectionDialog('{0}', document.getElementById('{1}').value, '{2}', '{3}', '{4}', '{5}', '{6}');",
UriSupport.ResolveUrlBySettings(ControlPath),
ValueControl.ClientID,
DisplayControl.ClientID,
ValueControl.ClientID,
ContentLanguage.PreferredCulture.Name,
DialogWidth,
DialogHeight
));
Controls.Add(openDialogButton);
}
示例5: AddEditor
protected override Control AddEditor(Control container)
{
// Register the javascript needed for the control.
container.Page.JavaScript(Engine.ManagementPaths.ResolveResourceUrl("~/Scripts/underscore-min.js"));
container.Page.JavaScript(Engine.ManagementPaths.ResolveResourceUrl("~/Scripts/backbone-min.js"));
LoadControlScripts(container);
var control = new Control();
var textBox = new TextBox {CssClass = "textEditor", ID = Name};
textBox.ID = textBox.ID;
control.Controls.Add(textBox);
var csButton = new HtmlInputButton();
csButton.Attributes["value"] = ButtonText;
csButton.Attributes["class"] = string.Format("{0}-selector-button", ButtonClassPrefix);
csButton.Attributes["data-app-path"] = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) + HttpContext.Current.Request.ApplicationPath;
csButton.Attributes["data-image-control-id"] = textBox.ClientID;
if (PropertyMap != null)
csButton.Attributes["data-property-map"] = PropertyMapToJson();
SetCustomAttributes(container, csButton);
control.Controls.Add(csButton);
container.Controls.Add(control);
return control;
}
示例6: CreateBackupButton
private void CreateBackupButton(HtmlGenericControl container)
{
using (HtmlInputButton backupButton = new HtmlInputButton())
{
backupButton.Attributes.Add("class", "ui red button disabled loading");
backupButton.Value = Titles.BackupNow;
backupButton.ID = "BackupButton";
container.Controls.Add(backupButton);
}
}
示例7: CreateFlagButton
private void CreateFlagButton(HtmlGenericControl container)
{
using (HtmlInputButton flagButton = new HtmlInputButton())
{
flagButton.ID = "FlagButton";
flagButton.Value = Titles.Flag;
flagButton.Attributes.Add("class", "ui button");
container.Controls.Add(flagButton);
}
}
示例8: AddSaveButton
private void AddSaveButton(HtmlGenericControl div)
{
using (HtmlInputButton button = new HtmlInputButton())
{
button.ID = "SaveButton";
button.Value = Titles.Save;
button.Attributes.Add("class", "ui small blue button");
div.Controls.Add(button);
}
}
示例9: CreateSaveButton
private void CreateSaveButton(Control container)
{
using (HtmlInputButton saveButton = new HtmlInputButton())
{
saveButton.ID = "SaveButton";
saveButton.Attributes.Add("class", "small ui button red");
saveButton.Value = Titles.Save;
container.Controls.Add(saveButton);
}
}
示例10: CreateUndoButton
private void CreateUndoButton(HtmlGenericControl container)
{
using (HtmlInputButton undoButton = new HtmlInputButton())
{
undoButton.ID = "UndoButton";
undoButton.Value = Titles.Undo;
undoButton.Attributes.Add("class", "ui small red button");
container.Controls.Add(undoButton);
}
}
示例11: AddSaveButton
private static void AddSaveButton(HtmlGenericControl container)
{
using (HtmlInputButton saveButton = new HtmlInputButton())
{
saveButton.ID = "SaveButton";
saveButton.Attributes.Add("class", "small ui red button");
saveButton.Value = Titles.Save;
container.Controls.Add(saveButton);
}
}
示例12: CreatePrintButton
private void CreatePrintButton(HtmlGenericControl container)
{
using (HtmlInputButton printButton = new HtmlInputButton())
{
printButton.ID = "PrintButton";
printButton.Value = Titles.Print;
printButton.Attributes.Add("class", "ui button");
container.Controls.Add(printButton);
}
}
示例13: CreateUploadButton
private void CreateUploadButton(HtmlGenericControl container)
{
using (HtmlInputButton uploadButton = new HtmlInputButton())
{
uploadButton.ID = "UploadButton";
uploadButton.Value = Titles.Upload;
uploadButton.Attributes.Add("class", "ui small blue button");
container.Controls.Add(uploadButton);
}
}
示例14: CreatSaveButton
private void CreatSaveButton(HtmlGenericControl container)
{
using (HtmlInputButton saveButton = new HtmlInputButton())
{
saveButton.ID = "SaveButton";
saveButton.Attributes.Add("class", "ui small green button");
saveButton.Value = Titles.Save;
saveButton.Visible = this.ShowSaveButton;
container.Controls.Add(saveButton);
}
}
示例15: AddCancelButton
private void AddCancelButton(HtmlGenericControl p)
{
using (HtmlInputButton button = new HtmlInputButton())
{
button.ID = "CancelButton";
button.CausesValidation = false;
button.Value = Titles.Cancel;
button.Attributes.Add("class", "ui red small submit button");
p.Controls.Add(button);
}
}