New Member FAQ | Forums | Earn Revenue


Resources Entrance Ask Experts Exam Papers Jobs English Projects Universities Colleges Courses Schools Training My India



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter



Create Controls using Placeholder in ASP.Net


Posted Date:     Total Responses: 0    Posted By: UltimateRengan   Member Level: Gold   Points/Cash: 4   


PlaceHolder:-
It does not have any visual output and its used to add controls to page at run time.



Check the below code :-



Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Create the object for Textbox control
Dim txt As New TextBox
txt.Text = "Dynamic Textbox"
txt.ID = "txtDynamic"
'Bind the textbox control to placeholder
PlaceHolder1.Controls.Add(txt)
'Create the Object for Button
Dim btn As New Button
btn.Text = "Dynamic button"
AddHandler btn.Click, AddressOf Button1_Click
PlaceHolder1.Controls.Add(btn)
End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
MsgBox("Dynamic Button Events")
End Sub
End Class




Project Feedbacks


No feedbacks found. Be the first to respond and make money from revenue sharing program.

Post Feedback
You must Sign In to post a feedback.
Next Project: How to show Empty gridview using C#?
Previous Project: Dynamic controls through SQL Server using VB.Net

Return to Project Index

Post New Project


Related Projects



Advertise Here





Contact Us   Advertise   Editors    Privacy Policy    Terms Of Use   

ISC Technologies.
2006 - 2009 All Rights Reserved.