C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...







Dynamic Linkbutton using ASP.Net


Posted Date: 22 Jul 2008    Resource Type: Code Snippets    Category: ASP.NET WebForms

Posted By: UltimateRengan       Member Level: Diamond
Rating:     Points: 4



This code sample explains how to create linkbuttons dynamically. The steps involved in doing so are:

1)create the object for linkbutton
2)Give the display text for link button
3)Add the link button to form
4)give the postbackurl property for linkbutton.


Add the following code in a Page_Load event.

Dim linkToSecondPage As LinkButton
linkToSecondPage = New LinkButton
linkToSecondPage.Text = "LinkToSecondPage"
form1.Controls.Add(linkToSecondPage)
linkToSecondPage.PostBackUrl = "Default2.aspx"







Responses

Author: Roshan R Mhatre    23 Jul 2008Member Level: Gold   Points : 1
This is C# Code for Dynamic Link Button

LinkButton linkToSecondPage=new LinkButton();
linkToSecondPage.Text = "LinkToSecondPage";
form1.Controls.Add(linkToSecondPage);
linkToSecondPage.PostBackUrl = "Default2.aspx";


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Dynamic LinkButtons  .  Dynamic Linkbutton using ASP.Net  .  Dynamic LinkButton  .  ASP.NET LinkButtons  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to Create Menus Dynamically in ASP.NET
Previous Resource: How to Bind values to Dropdownlist through DataSet
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET WebForms


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

budget conference call

Contact Us    Privacy Policy    Terms Of Use