How to Create a Link Button by code behind?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnagJohari
    New Member
    • May 2010
    • 96

    How to Create a Link Button by code behind?

    Can we Create a link button by code behind .. means i have to create a multiple link button on a web page i want create this button dynamically from code behind
    please tell me can we do this?
  • ThatThatGuy
    Recognized Expert Contributor
    • Jul 2009
    • 453

    #2
    Create a new LinkButton Instance on your code-behind.
    Assign required properties of Link Button and then add it to some kind of container viz. Panel...

    [CODE=CSharp]
    Panel1.Controls .Add(linkButton );
    [/CODE]

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Check out this quick article on How to use dynamic controls in ASP.NET.

      -Frinny

      Comment

      Working...