private void CreateLinkButton(string commandArgument, string tidshow) { string[] show = tidshow.Split('*'); innerTableCell = new HtmlTableCell(); System.Web.UI.HtmlControls.HtmlGenericControl createDiv = new System.Web.UI.HtmlControls.HtmlGenericControl("DIV"); // createDiv.Style.Add(HtmlTextWriterStyle.BackgroundColor, "cyan"); // createDiv.Style.Add(HtmlTextWriterStyle.Color, "Red"); createDiv.Style.Add(HtmlTextWriterStyle.Height, "25px"); createDiv.Style.Add(HtmlTextWriterStyle.Width, "150px"); createDiv.Style.Add(HtmlTextWriterStyle.Position, "relative"); createDiv.Style.Add(HtmlTextWriterStyle.VerticalAlign, "false"); UpdatePanel up = new UpdatePanel(); up.ID = "up" + tidshow; LinkButton linkButton = new LinkButton { ID = tidshow, Text = show[1], CommandArgument = commandArgument, }; // linkButton.OnClientClick = "ShowPopup();"; linkButton.Command += this.linktest_Click; linkButton.CausesValidation = false; linkButton.EnableViewState = true; linkButton.ToolTip = "Filling Fast"; linkButton.Style.Add(HtmlTextWriterStyle.BorderColor, "green"); up.ContentTemplateContainer.Controls.Add(linkButton); createDiv.Controls.Add(up); innerTableCell.Controls.Add(createDiv); innerTableRow.Cells.Add(innerTableCell); } protected void linktest_Click(Object sender, CommandEventArgs e) { flag = "allow"; ViewState["isPostBackOfOutputPage"] = "yes"; ViewState["path"] = @e.CommandArgument.ToString(); show(e.CommandArgument.ToString()); }
linkButton.Click += new EventHandler(this.linktest_Click);
swapnil_jadhav <pre lang="cs">protected override void OnInit(EventArgs e) { base.OnInit(e); CreateLinkButton(); }</pre>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)