• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# LinkButton类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中LinkButton的典型用法代码示例。如果您正苦于以下问题:C# LinkButton类的具体用法?C# LinkButton怎么用?C# LinkButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LinkButton类属于命名空间,在下文中一共展示了LinkButton类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: lbDelete_Click

 protected void lbDelete_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = new LinkButton();
     linkButton = (LinkButton)sender;
     bool result = Pos_TransactionTypeManager.DeletePos_TransactionType(Convert.ToInt32(linkButton.CommandArgument));
     showPos_TransactionTypeGrid();
 }
开发者ID:anam,项目名称:gp-HO,代码行数:7,代码来源:AdminPos_TransactionTypeDisplay.aspx.cs


示例2: ClassInitialize

 public void ClassInitialize()
 {
     link = new LinkButton("My Link Button");
     link.Width = 120;
     TestHarness.AddControl(link);
     link.Model.Click += delegate { Log.Info("!! Click"); };
 }
开发者ID:philcockfield,项目名称:Open.TestHarness.SL,代码行数:7,代码来源:LinkButtonTest.cs


示例3: lbDelete_Click

 protected void lbDelete_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = new LinkButton();
     linkButton = (LinkButton)sender;
     bool result = ACC_JournalMasterManager.DeleteACC_JournalMaster(Convert.ToInt32(linkButton.CommandArgument));
     showACC_JournalMasterGrid();
 }
开发者ID:anam,项目名称:gp-HO,代码行数:7,代码来源:AdminACC_JournalMasterDisplay.aspx.cs


示例4: DisableControls

    private void DisableControls(Control gv)
    {
        LinkButton lb = new LinkButton();
        Literal l = new Literal();
        string name = String.Empty;

        for (int i = 0; i < gv.Controls.Count; i++)
        {
            if (gv.Controls[i].GetType() == typeof(LinkButton))
            {
                l.Text = (gv.Controls[i] as LinkButton).Text;
                gv.Controls.Remove(gv.Controls[i]);
                gv.Controls.AddAt(i, l);
            }
            else if (gv.Controls[i].GetType() == typeof(DropDownList))
            {
                l.Text = (gv.Controls[i] as DropDownList).SelectedItem.Text;
                gv.Controls.Remove(gv.Controls[i]);
                gv.Controls.AddAt(i, l);
            }

            if (gv.Controls[i].HasControls())
            {
                DisableControls(gv.Controls[i]);
            }
        }
    }
开发者ID:cnbin,项目名称:HLB,代码行数:27,代码来源:ReportViewData.aspx.cs


示例5: lbDelete_Click

 protected void lbDelete_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = new LinkButton();
     linkButton = (LinkButton)sender;
     bool result = AbsendSalaryDiductionManager.DeleteAbsendSalaryDiduction(Convert.ToInt32(linkButton.CommandArgument));
     showAbsendSalaryDiductionGrid();
 }
开发者ID:anam,项目名称:mal,代码行数:7,代码来源:AdminDisplayHR_AbsentSalaryDiduction.aspx.cs


示例6: CreateButtons

    void CreateButtons()
    {
        SqlConnection con = new SqlConnection(@"Data Source=.\sqlexpress;Initial Catalog=scrapbook;Integrated Security=True");
             SqlCommand cmd1 = new SqlCommand("select * from scrapbook where recieverid='" + Session["userid"].ToString() + "'", con);
              SqlDataAdapter da1 = new SqlDataAdapter();
              da1.SelectCommand = cmd1;
              DataSet ds1 = new DataSet();
              da1.Fill(ds1, "scrapbook");
              for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
              {
                  LinkButton btn = new LinkButton();
                  SqlDataAdapter da2 = new SqlDataAdapter("select * from login where userid='" + ds1.Tables[0].Rows[i]["senderid"].ToString() + "'", con);
                  DataSet ds2 = new DataSet();
                  da2.Fill(ds2);
                 // name = ds2.Tables[0].Rows[0]["username"].ToString();
                  btn.Text =ds2.Tables[0].Rows[0]["username"].ToString();
                  btn.ID = ds2.Tables[0].Rows[0]["userid"].ToString();
                  btn.CssClass = "username";
                  usr.Controls.Add(btn);

                 // dynamiclink.Visible = true;
                  btn.Click += new EventHandler(btn_Click);
              }

           // }
    }
开发者ID:anuj1992,项目名称:scrapbook,代码行数:26,代码来源:myprofile.aspx.cs


示例7: RadGrid1_ItemCreated

    public void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridCommandItem)
        {
            GridCommandItem commandItem = (e.Item as GridCommandItem);
            PlaceHolder container = (PlaceHolder)commandItem.FindControl("PlaceHolder1");
            Label label = new Label();
            label.Text = "&nbsp;&nbsp;";

            container.Controls.Add(label);

            for (int i = 65; i <= 65 + 25; i++)
            {
                LinkButton linkButton1 = new LinkButton();

                LiteralControl lc = new LiteralControl("&nbsp;&nbsp;");

                linkButton1.Text = "" + (char)i;

                linkButton1.CommandName = "alpha";
                linkButton1.CommandArgument = "" + (char)i;

                container.Controls.Add(linkButton1);
                container.Controls.Add(lc);
            }

            LiteralControl lcLast = new LiteralControl("&nbsp;");
            container.Controls.Add(lcLast);

            LinkButton linkButtonAll = new LinkButton();
            linkButtonAll.Text = "Tất cả";
            linkButtonAll.CommandName = "NoFilter";
            container.Controls.Add(linkButtonAll);
        }
    }
开发者ID:hungtien408,项目名称:web-quanaotreem,代码行数:35,代码来源:manufacturer1.aspx.cs


示例8: setTable

    protected void setTable()
    {
        DataTable myDataTable = new DataTable();
        JobsModule myJobsModule = new JobsModule();
        myJobsModule.setUserId((String)Session["userId"]);

        myDataTable = myJobsModule.getEmployersJobPositions().Copy();

        myDataTable.Columns.Add("Delete", typeof(String)).SetOrdinal(0);
        myDataTable.Columns.Add("List of Applied Applicants", typeof(String)).SetOrdinal(4);

        JobPositionsGridView.DataSource = myDataTable;
        JobPositionsGridView.DataBind();

        foreach (GridViewRow row in JobPositionsGridView.Rows)
        {
            LinkButton lb = new LinkButton();
            lb.Text = "Delete";
            lb.Click += new EventHandler(LinkButtonClicked);
            row.Cells[0].Controls.Add(lb);

            HyperLink hp = new HyperLink();
            hp.Text = row.Cells[2].Text;
            hp.NavigateUrl = "~/ShowJobPositionsManager.aspx?pId=" + row.Cells[1].Text;
            row.Cells[2].Controls.Add(hp);

            HyperLink hp2 = new HyperLink();
            hp2.Text = "Show Applied Applicants";
            hp2.NavigateUrl = "~/ListOfAppliedApplicants.aspx?pId=" + row.Cells[1].Text;
            row.Cells[4].Controls.Add(hp2);
        }
    }
开发者ID:lilylakshi,项目名称:second-year-group-project,代码行数:32,代码来源:ViewEmployersJobPositions.aspx.cs


示例9: lbDelete_Click

 protected void lbDelete_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = new LinkButton();
     linkButton = (LinkButton)sender;
     bool result = MenuRoleManager.DeleteMenuRole(Convert.ToInt32(linkButton.CommandArgument));
     showMenuRoleGrid();
 }
开发者ID:anam,项目名称:gp-HO,代码行数:7,代码来源:AdminMenuRoleDisplay.aspx.cs


示例10: dlBind

    /// <summary>
    /// DataList控件绑定及分页
    /// </summary>
    /// <param name="intCount">每页显示的记录条数</param>
    /// <param name="ds">DataSet数据集</param>
    /// <param name="labPage">当前页码</param>
    /// <param name="labTPage">总页码</param>
    /// <param name="lbtnUp">上一页</param>
    /// <param name="lbtnNext">下一页</param>
    /// <param name="lbtnBack">最后一页</param>
    /// <param name="lbtnOne">第一页</param>
    /// <param name="dl">DataList控件对象</param>
    public static void dlBind(int intCount, DataSet ds, Label labPage, Label labTPage, LinkButton lbtnUp, LinkButton lbtnNext, LinkButton lbtnBack, LinkButton lbtnOne, Repeater dl)
    {
        int curpage = Convert.ToInt32(labPage.Text);
        PagedDataSource ps = new PagedDataSource();
        ps.DataSource = ds.Tables[0].DefaultView;
        ps.AllowPaging = true; //是否可以分页
        ps.PageSize = intCount; //显示的数量
        ps.CurrentPageIndex = curpage - 1; //取得当前页的页码

        lbtnNext.Visible = true;
        lbtnOne.Visible = true;
        lbtnBack.Visible = true;
        lbtnUp.Visible = true;

        lbtnNext.Enabled = true;
        lbtnBack.Enabled = true;
        lbtnOne.Enabled = true;
        if (curpage == 1)
        {
            lbtnOne.Visible = false;//不显示第一页按钮
            lbtnUp.Visible = false;//不显示上一页按钮
        }
        if (curpage == ps.PageCount)
        {
            lbtnNext.Visible = false;//不显示下一页
            lbtnBack.Visible = false;//不显示最后一页
        }
        labTPage.Text = Convert.ToString(ps.PageCount);
        dl.DataSource = ps;
           // dl.DataKeyField = "ID";
        dl.DataBind();
    }
开发者ID:gqb101112,项目名称:ZCoder,代码行数:44,代码来源:DataOperate.cs


示例11: DrawPages

    public void DrawPages()
    {
        PagesRow.Controls.Clear();

        int start = 0;
        if (Pages <= 1)
            return;

        while (start < Pages)
        {
            TableCell cell = new TableCell();
            LinkButton link = new LinkButton();
            link.ID = "Link" + start.ToString();
            link.Text = (start + 1).ToString();
            link.Click += new EventHandler(link_Click);

            if (start == CurrentPage)
            {
                link.BorderStyle = BorderStyle.Solid;
                link.BorderColor = Color.Red;
                link.BorderWidth = Unit.Pixel(1);
            }
            cell.Controls.Add(link);

            PagesRow.Controls.Add(cell);
            start++;
        }
    }
开发者ID:jbvios,项目名称:mtbscout,代码行数:28,代码来源:PageCounter.ascx.cs


示例12: lbDelete_Click

 protected void lbDelete_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = new LinkButton();
     linkButton = (LinkButton)sender;
     bool result = Inv_QuantityUnitManager.DeleteInv_QuantityUnit(Convert.ToInt32(linkButton.CommandArgument));
     showInv_QuantityUnitGrid();
 }
开发者ID:anam,项目名称:gp-HO,代码行数:7,代码来源:AdminInv_QuantityUnitDisplay.aspx.cs


示例13: lbDelete_Click

 protected void lbDelete_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = new LinkButton();
     linkButton = (LinkButton)sender;
     bool result = ACC_ChartOfAccountLabel3Manager.DeleteACC_ChartOfAccountLabel3(Convert.ToInt32(linkButton.CommandArgument));
     showACC_ChartOfAccountLabel3Grid();
 }
开发者ID:anam,项目名称:gp-HO,代码行数:7,代码来源:AdminACC_ChartOfAccountLabel3Display.aspx.cs


示例14: lbDelete_Click

 protected void lbDelete_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = new LinkButton();
     linkButton = (LinkButton)sender;
     bool result = Pos_BranchWiseProductStockCapacityManager.DeletePos_BranchWiseProductStockCapacity(Convert.ToInt32(linkButton.CommandArgument));
     showPos_BranchWiseProductStockCapacityGrid();
 }
开发者ID:anam,项目名称:gp-HO,代码行数:7,代码来源:AdminPos_BranchWiseProductStockCapacityDisplay.aspx.cs


示例15: lbDelete_Click

 protected void lbDelete_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = new LinkButton();
     linkButton = (LinkButton)sender;
     bool result = Pos_ProductStatusManager.DeletePos_ProductStatus(Convert.ToInt32(linkButton.CommandArgument));
     showPos_ProductStatusGrid();
 }
开发者ID:anam,项目名称:gp-HO,代码行数:7,代码来源:AdminPos_ProductStatusDisplay.aspx.cs


示例16: createLinks

    public void createLinks()
    {
        if (addrList != null)
        {
            string prevName = "";

            foreach (AddressClass address in addrList)
            {
                if (address.firstLetterLN != prevName)
                {
                    
                    LinkButton temp = new LinkButton();
                    string letter = address.firstLetterLN.ToString();
                    temp.ID = letter;
                    temp.Text = letter + "  ";
                    temp.Font.Underline = false;
                    temp.Click += LinkButton1_Click;
                    Panel1.Controls.Add(temp);
                    prevName = address.firstLetterLN;

                }
            }
        }
        else
        {
            Response.Redirect(Request.RawUrl); 
        }
    }
开发者ID:EdwinGendron,项目名称:school,代码行数:28,代码来源:AddressFinder.aspx.cs


示例17: BindData

    protected void BindData(LinkButton button)
    {
        GridViewRow gvr = (GridViewRow)button.Parent.Parent;
        int selectID = Convert.ToInt32(BulletinGridView.DataKeys[gvr.RowIndex].Value);
        this.EditID.Text = selectID.ToString();
        ERS.BulletinRow bulletin = ms.GetBulletinById(selectID)[0];

        string name = button.ID;
        this.EditBulletinTitleTextBox.Text = bulletin.BulletinTitle;
        this.EditBulletinContentTextBox.Text = bulletin.BulletinContent;
        this.EditIsActiveCheckBox.Checked = bulletin.IsActive;
        this.EditIsHotCheckBox.Checked = bulletin.IsHot;
        if (!bulletin.IsAttachFileNameNull())
            this.EditUCFileUpload.AttachmentFileName = bulletin.AttachFileName;
        else
            this.EditUCFileUpload.AttachmentFileName = null;
        if (!bulletin.IsRealAttachFileNameNull())
            this.EditUCFileUpload.RealAttachmentFileName = bulletin.RealAttachFileName;
        else
            this.EditUCFileUpload.RealAttachmentFileName = null;

        if (name == "TitleCtl") {
            EditBulletinTitleTextBox.ReadOnly = true;
            EditBulletinContentTextBox.ReadOnly = true;
            EditIsHotCheckBox.Enabled = false;
            EditIsActiveCheckBox.Enabled = false;
            tr1.Visible = false;
            this.EditUCFileUpload.IsView = true;
        }
        if (name == "EditBtn") {
            show();
        }
        this.Opdiv.Visible = true;
    }
开发者ID:hijoy,项目名称:VSL_ERS,代码行数:34,代码来源:Announcement.aspx.cs


示例18: lbDelete_Click

 protected void lbDelete_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = new LinkButton();
     linkButton = (LinkButton)sender;
     bool result = Inv_ItemTransactionManager.DeleteInv_ItemTransaction(Convert.ToInt32(linkButton.CommandArgument));
     showInv_ItemTransactionGrid();
 }
开发者ID:anam,项目名称:gp-HO,代码行数:7,代码来源:AdminInv_ItemTransactionDisplay.aspx.cs


示例19: lbDelete_Click

 protected void lbDelete_Click(object sender, EventArgs e)
 {
     LinkButton linkButton = new LinkButton();
     linkButton = (LinkButton)sender;
     bool result = Inv_UtilizationDetailsManager.DeleteInv_UtilizationDetails(Convert.ToInt32(linkButton.CommandArgument));
     showInv_UtilizationDetailsGrid();
 }
开发者ID:anam,项目名称:gp-HO,代码行数:7,代码来源:AdminInv_UtilizationDetailsDisplay.aspx.cs


示例20: CreateTableAlertCondition

	private void CreateTableAlertCondition()
	{
		IList alertConditions = TheAdminServer.GameServerMonitor.AlertConditions;

		for (int i = 0; i < alertConditions.Count; i++)
		{
			AlertCondition condition = alertConditions[i] as AlertCondition;
			
			TableRow row = new TableRow();
			TableCell cell = new TableCell();
			LinkButton linkButtonRemove = new LinkButton();
            linkButtonRemove.Attributes.Add(WebConfig.ParamIndex, i.ToString());
			linkButtonRemove.SkinID = "PlainText";
			//linkButtonRemove.NavigateUrl = "AlertConfig.aspx?" + WebConfig.ParamOperation + "=" + OperationRemoveAlertCondition + "&" + WebConfig.ParamIndex + "=" + i;
            linkButtonRemove.Click += LinkButtonRemove_Click;
			linkButtonRemove.Text = StringDef.Remove;
            linkButtonRemove.ID = "LinkButtonRemove"+i.ToString();
			cell.Controls.Add(linkButtonRemove);
			row.Cells.Add(cell);
			cell = new TableCell();
			cell.Text = (i + 1).ToString();
			row.Cells.Add(cell);
			cell = new TableCell();
			cell.Text = condition.ToString();
			row.Cells.Add(cell);

			TableAlertCondition.Rows.Add(row);
		}
	}
开发者ID:viticm,项目名称:pap2,代码行数:29,代码来源:AlertConfig.aspx.cs



注:本文中的LinkButton类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LinkType类代码示例发布时间:2022-05-24
下一篇:
C# Link类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap