How can we create custom controls in ASP.NET?

 Posted by ArticlesMaint on 9/15/2009 | Category: ASP.NET Interview questions | Views: 3597

Answer: -
User controls are created using .ASCX in ASP.NET. After .ASCX file is created you need to two things in order that the ASCX can be used in project: -

• Register the ASCX control in page using the <percentage@ Register directive.Example

<%@ Register tag prefix="Accounting" Tag name="footer" Src="Footer.ascx" %>

• Now to use the above accounting footer in page you can use the below directive.

<Accounting: footer runat="server" />

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response