本文整理汇总了C#中System.Web.UI.WebControls.HiddenField类的典型用法代码示例。如果您正苦于以下问题:C# HiddenField类的具体用法?C# HiddenField怎么用?C# HiddenField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HiddenField类属于System.Web.UI.WebControls命名空间,在下文中一共展示了HiddenField类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AddUpdatePanel
private void AddUpdatePanel(Panel p)
{
this.messageLabel = new Label();
this.updatePanel = new UpdatePanel();
this.updatePanel.ID = "ScrudUpdatePanel";
this.updatePanel.ChildrenAsTriggers = true;
this.updatePanel.UpdateMode = UpdatePanelUpdateMode.Conditional;
this.updatePanel.ContentTemplateContainer.Controls.Add(this.topCommandPanel.GetCommandPanel("top"));
this.updatePanel.ContentTemplateContainer.Controls.Add(this.messageLabel);
this.updatePanel.ContentTemplateContainer.Controls.Add(this.gridPanel);
this.updatePanel.ContentTemplateContainer.Controls.Add(this.formPanel);
this.updatePanel.ContentTemplateContainer.Controls.Add(this.bottomCommandPanel.GetCommandPanel("bottom"));
//Bottom command panel.
this.userIdHidden = new HiddenField();
this.userIdHidden.ID = "UserIdHidden";
this.userIdHidden.Value = this.UserId.ToString(CultureInfo.InvariantCulture);
this.officeCodeHidden = new HiddenField();
this.officeCodeHidden.ID = "OfficeCodeHidden";
this.officeCodeHidden.Value = this.OfficeCode;
this.updatePanel.ContentTemplateContainer.Controls.Add(this.userIdHidden);
this.updatePanel.ContentTemplateContainer.Controls.Add(this.officeCodeHidden);
p.Controls.Add(this.updatePanel);
}
开发者ID:JonathanValle,项目名称:mixerp,代码行数:28,代码来源:UpdatePanel.cs
示例2: ImageUploader
/// <summary>
/// Initializes a new instance of the <see cref="ImageUploader"/> class.
/// </summary>
public ImageUploader()
: base()
{
HelpBlock = new HelpBlock();
_hfBinaryFileId = new HiddenField();
_hfBinaryFileTypeGuid = new HiddenField();
}
开发者ID:Ganon11,项目名称:Rock,代码行数:10,代码来源:ImageUploader.cs
示例3: AgregarControles
protected void AgregarControles(Label nombreContr, CheckBox chB, TextBox tbox, HiddenField nuevoHidF, Label hrReg, Label observ)
{
try
{
PanelConVisita.Controls.Add(new LiteralControl("<tr>"));
PanelConVisita.Controls.Add(new LiteralControl("<td>"));
PanelConVisita.Controls.Add(nombreContr);
PanelConVisita.Controls.Add(new LiteralControl("</td><td>"));
PanelConVisita.Controls.Add(new LiteralControl(" "));
PanelConVisita.Controls.Add(new LiteralControl("</td><td>"));
if (hrReg == null)
{
PanelConVisita.Controls.Add(chB);
}
else
{
PanelConVisita.Controls.Add(hrReg);
}
PanelConVisita.Controls.Add(new LiteralControl("</td><td>"));
if (hrReg == null)
{
PanelConVisita.Controls.Add(tbox);
}
else
{
PanelConVisita.Controls.Add(observ);
}
PanelConVisita.Controls.Add(new LiteralControl("</td></tr>"));
}
catch (Exception ex)
{
return;
}
}
开发者ID:xtiansol,项目名称:MORRABCV,代码行数:35,代码来源:frmRegistro.aspx.cs
示例4: agregarFiltro
protected void agregarFiltro(string nombre)
{
try
{
Label campoSel = new Label();
campoSel.Text = nombre;
//arregloLabels[numeroRegistro] = campoSel;
TextBox nuevoTxt = new TextBox();
nuevoTxt.ID = "txt" + nombre;
nuevoTxt.Width = 100;
//arregloTextBoxs[numeroRegistro] = nuevoTxt;
DropDownList nuevoCmb = new DropDownList();
nuevoCmb.ID = "cmb" + nombre;
nuevoCmb.Items.Add("--Seleccione operador--");
nuevoCmb.Items.Add("<");
nuevoCmb.Items.Add(">");
nuevoCmb.Items.Add(">=");
nuevoCmb.Items.Add("<=");
nuevoCmb.Items.Add("=");
nuevoCmb.Items.Add("<>");
nuevoCmb.SelectedIndex = 0;
//arregloCombos[numeroRegistro] = nuevoCmb;
HiddenField nuevoHidF = new HiddenField();
nuevoHidF.ID = "hdf" + nombre;
nuevoHidF.Value = nombre;
AgregarControles(campoSel, nuevoTxt, nuevoCmb, nuevoHidF, 0);
//contadorControles++;
}
catch (Exception ex)
{
return;
}
}
开发者ID:rudolfcruz,项目名称:Reports,代码行数:34,代码来源:frmFiltros.aspx.cs
示例5: displayShow
private void displayShow(PlaceHolder placeholder, int shid)
{
placeholder.Controls.Clear();
Show show = new Show();
show.id = Convert.ToInt32(Request["shid"]);
show.get();
TextBox tickets = new TextBox();
tickets.ID = "numOfTickets";
Button order = new Button();
order.Text = "Order!";
order.Click += new System.EventHandler(this.orderClick);
HiddenField hiddenShid = new HiddenField();
hiddenShid.Value = shid.ToString();
hiddenShid.ID = "hiddenShid";
placeholder.Controls.Add(new LiteralControl("<h1>"+show.read("moid", true)+" @ "+show.read("show_start")+"</h1>"));
placeholder.Controls.Add(new LiteralControl("<p>### tickets left</p>"));
placeholder.Controls.Add(new LiteralControl("<p>Please input # of tickets you want to order</p>"));
placeholder.Controls.Add(tickets);
placeholder.Controls.Add(order);
placeholder.Controls.Add(new LiteralControl("<br /><br /><a href=\"order_ticket.aspx\">Back to show list</a>"));
placeholder.Controls.Add(hiddenShid);
}
开发者ID:cmol,项目名称:cinemaxxx,代码行数:26,代码来源:order_ticket.aspx.cs
示例6: AddCompactCheckBoxField
private void AddCompactCheckBoxField(HtmlGenericControl container)
{
using (HtmlGenericControl field = HtmlControlHelper.GetField())
{
using (HtmlGenericControl slider = new HtmlGenericControl("div"))
{
slider.Attributes.Add("class", "ui checkbox");
using (HtmlInputCheckBox checkBox = new HtmlInputCheckBox())
{
checkBox.ID = "CompactCheckBox";
checkBox.Checked = false;
slider.Controls.Add(checkBox);
this.isCompactHidden = new HiddenField();
this.isCompactHidden.ID = "IsCompactHidden";
this.isCompactHidden.Value = "0";
slider.Controls.Add(this.isCompactHidden);
}
using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.ShowCompact))
{
slider.Controls.Add(label);
}
field.Controls.Add(slider);
}
container.Controls.Add(field);
}
}
开发者ID:roczj,项目名称:mixerp,代码行数:32,代码来源:ProfitAndLossAccount.ascx.cs
示例7: AgregarControles
protected void AgregarControles(Label nombreContr, TextBox txt, DropDownList cmb, HiddenField nhf, int cont)
{
try
{
/*
pnlSeleccionarDatos.Controls.Add(nombreContr);
pnlSeleccionarDatos.Controls.Add(new LiteralControl(" "));
pnlSeleccionarDatos.Controls.Add(cmb);
pnlSeleccionarDatos.Controls.Add(new LiteralControl(" "));
pnlSeleccionarDatos.Controls.Add(txt);
pnlSeleccionarDatos.Controls.Add(new LiteralControl(" "));
*/
Panel1.Controls.Add(new LiteralControl("<tr>"));
Panel1.Controls.Add(new LiteralControl("<td>"));
Panel1.Controls.Add(nombreContr);
Panel1.Controls.Add(new LiteralControl("</td><td>"));
Panel1.Controls.Add(cmb);
Panel1.Controls.Add(new LiteralControl("</td><td>"));
Panel1.Controls.Add(txt);
Panel1.Controls.Add(nhf);
Panel1.Controls.Add(new LiteralControl("</td></tr>"));
}
catch (Exception ex)
{
return;
}
}
开发者ID:rudolfcruz,项目名称:Reports,代码行数:27,代码来源:frmSelectTablas.aspx.cs
示例8: TreeViewAdapter
/// <summary>
/// Initializes a new instance of the <see cref="T:TreeViewAdapter"/> class.
/// </summary>
public TreeViewAdapter()
{
if (_viewState == null)
{
_viewState = new HiddenField();
}
}
开发者ID:JenasysDesign,项目名称:BootstrapControlAdapters,代码行数:10,代码来源:TreeViewAdapter.cs
示例9: SageInitPart
private void SageInitPart()
{
SetPortalCofig();
InitializePage();
LoadModuleControls();
IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
//LoadControl(phdAdministrativBreadCrumb, "~/Controls/ctl_AdminBreadCrum.ascx");
LoadControl(phdAdminMenu, "~/Controls/ctl_AdminMenuOnly.ascx");
if (sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalShowFooter) == "1")
{
divFooterWrapper.Attributes.Add("style", "display:block;");
}
else
{
divFooterWrapper.Attributes.Add("style", "display:none;");
}
BindModuleControls();
HiddenField hdnPageID = new HiddenField();
hdnPageID.ID = "hdnPageID";
if (HttpContext.Current.Request.QueryString["pgid"] != null)
{
hdnPageID.Value = HttpContext.Current.Request.QueryString["pgid"].ToString();
}
HiddenField hdnActiveIndex = new HiddenField();
hdnActiveIndex.ID = "hdnActiveIndex";
if (HttpContext.Current.Request.QueryString["ActInd"] != null)
{
hdnActiveIndex.Value = HttpContext.Current.Request.QueryString["ActInd"].ToString();
}
this.Page.Form.Controls.Add(hdnPageID);
this.Page.Form.Controls.Add(hdnActiveIndex);
OverridePageInfo(null);
}
开发者ID:Dashboard-X,项目名称:Aspxcommerce,代码行数:33,代码来源:ManagePage.aspx.cs
示例10: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Request.Cookies.Clear();
mnuMain.Items.Clear();
m_User = (UserObject)Session["User"];
if (m_User != null)
{
lblLoggedInAs.Visible = true;
lblLoggedInAs.Text = string.Concat(GetLocalResourceObject("LoggedInAs"), " ", m_User.UserName, " | ");
linkLogout.Visible = true;
lblVersion.Visible = true;
lblVersion.Text = ConfigurationManager.AppSettings["version"];
if (MenuList == null)
FetchMenu();
BuildMenu(mnuMain, dsMenuItems);
Session["User"] = m_User;
}
HiddenField field = new HiddenField
{
ID = "SessionID",
Value = Session.SessionID
};
Page.Form.Controls.Add(field);
lblError.Text = "";
}
开发者ID:jandppw,项目名称:ppwcode-recovered-from-google-code,代码行数:28,代码来源:UserManagement.Master.cs
示例11: CreateChildControls
protected override void CreateChildControls()
{
HiddenField selected_node = new HiddenField();
selected_node.ID = "selected-data";
this.Controls.Add(selected_node);
if (this.EventMode == true)
{
Button button = new Button();
button.ID = "button";
button.CssClass = "treebutton hidden";
button.Click += new EventHandler(button_Click);
this.Controls.Add(button);
/*
HiddenField value = new HiddenField();
value.ID = "selected-data";
this.Controls.Add(value);
* */
}
LiteralControl content = new LiteralControl();
content.ID = "content";
this.Controls.Add(content);
}
开发者ID:paopaofeng,项目名称:dp2,代码行数:25,代码来源:TreeControl.cs
示例12: DemoServerControl
public DemoServerControl()
{
this.astvMyTree = new ASTreeView();
this.hfSelectedNodeText = new HiddenField();
this.hfSelectedNodeValue = new HiddenField();
this.btnPostBackTrigger = new Button();
}
开发者ID:jinweijie,项目名称:Goldtect.ASTreeViewSamples,代码行数:7,代码来源:DemoServerControl.cs
示例13: Imagem
public Imagem(Image Image, HiddenField Hidden, string Path, string Arquivo)
{
this.Image = Image;
this.Hidden = Hidden;
this.Path = Path;
this.Arquivo = Arquivo;
}
开发者ID:Janailson,项目名称:loja,代码行数:7,代码来源:Imagem.cs
示例14: OnInit
protected override void OnInit(EventArgs e)
{
if (KPColumnsModel != null)
{
HtmlGenericControl htmlWindow = new HtmlGenericControl("div");
htmlWindow.Attributes.Add("class", "KPWindow KPFormWindow KPFormZoom");
#region Hidden Key
HiddenKey = new HiddenField();
HiddenKey.ID = String.Format("hiddenKey_{0}", ZoomConfig.ZoomID);
#endregion Hidden Key
htmlWindow.Controls.Add(GenerateTitle(ZoomConfig.WindowTitle));
htmlWindow.Controls.Add(HiddenKey);
#region Zoom Content
tableID = String.Concat(this.ClientID, "GridTable");
pagerID = String.Concat(this.ClientID, "GridPager");
HtmlGenericControl htmlContent = new HtmlGenericControl("div");
htmlContent.Attributes.Add("class", "Content");
HtmlGenericControl htmlTable = new HtmlGenericControl("table");
htmlTable.Attributes.Add("id", tableID);
HtmlGenericControl htmlPager = new HtmlGenericControl("div");
htmlPager.Attributes.Add("id", pagerID);
htmlContent.Controls.Add(htmlTable);
htmlContent.Controls.Add(htmlPager);
#endregion
htmlWindow.Controls.Add(htmlContent);
#region Zoom Action Bar
HtmlGenericControl htmlKPActionBar = new HtmlGenericControl("div");
htmlKPActionBar.Attributes.Add("class", "KPActionBar");
Button btnOK = new Button()
{
ID = String.Format("KPGridControlBtnOK_{0}", ZoomConfig.ZoomID),
Text = KPGlobalizationLanguage.GetString("KPComponents_Select"),
CssClass = "KPZoomSelectButton"
};
btnOK.Attributes.Add("onclick", "return validateGridSelection(event, '" + tableID + "', true, true);");
btnOK.Click += new EventHandler(btnOK_Click);
htmlKPActionBar.Controls.Add(btnOK);
#endregion
htmlWindow.Controls.Add(htmlKPActionBar);
this.Controls.Add(htmlWindow);
}
base.OnInit(e);
}
开发者ID:NumericTechnology,项目名称:Platanum.Net,代码行数:59,代码来源:KPZoomControl.cs
示例15: AddEmailHidden
private void AddEmailHidden(HtmlGenericControl p)
{
this.emailHidden = new HiddenField();
this.emailHidden.ID = "EmailHidden";
this.emailHidden.ClientIDMode = ClientIDMode.Static;
p.Controls.Add(this.emailHidden);
}
开发者ID:JonathanValle,项目名称:mixerp,代码行数:8,代码来源:HiddenFields.cs
示例16: AddHiddenField
private void AddHiddenField(Panel p, string id)
{
using (HiddenField hidden = new HiddenField())
{
hidden.ID = id;
p.Controls.Add(hidden);
}
}
开发者ID:roczj,项目名称:mixerp,代码行数:8,代码来源:TabBody.cs
示例17: InitializeControls
/// <summary>
/// Initializes the controls part of your template.
/// </summary>
/// <param name="container">Template container for all controls.</param>
/// <remarks>
/// Initialize your controls in this method. Do not override CreateChildControls method.
/// </remarks>
protected override void InitializeControls(GenericContainer container)
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
List<Hashtable> images = this.GetImages();
string serializedCollection = serializer.Serialize(images);
this.imagesField = container.GetControl<HiddenField>("imagesField", true);
this.imagesField.Value = serializedCollection;
}
开发者ID:Gebov,项目名称:Telerik.Sitefinity.Samples.Coverflow,代码行数:16,代码来源:CoverFlow.cs
示例18: FillPeoplePickerValue
public static void FillPeoplePickerValue(HiddenField peoplePickerHiddenField, Microsoft.SharePoint.Client.User[] users)
{
List<PeoplePickerUser> peoplePickerUsers = new List<PeoplePickerUser>();
foreach (var user in users)
{
peoplePickerUsers.Add(new PeoplePickerUser() { Name = user.Title, Email = user.Email, Login = user.LoginName });
}
peoplePickerHiddenField.Value = JsonHelper.Serialize<List<PeoplePickerUser>>(peoplePickerUsers);
}
开发者ID:Calisto1980,项目名称:PnP,代码行数:9,代码来源:PeoplePickerHelper.cs
示例19: CreateHiddenFields
private void CreateHiddenFields(Control container)
{
using (HiddenField uploadedFilesHidden = new HiddenField())
{
uploadedFilesHidden.ID = "UploadedFilesHidden";
container.Controls.Add(uploadedFilesHidden);
}
}
开发者ID:abinabrahamanchery,项目名称:mixerp,代码行数:9,代码来源:HiddenFields.cs
示例20: OnInit
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
// Create hidden control for storage
storage = new HiddenField();
storage.ID = "storage";
Controls.Add(storage);
}
开发者ID:anddudek,项目名称:anjlab.fx,代码行数:9,代码来源:PersistentScrollPosition.cs
注:本文中的System.Web.UI.WebControls.HiddenField类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论