What does the function of Register tag in .aspx

J

Juan T. Llibre

"Register TagPrefix" initializes a User Control.

The code for the User Control is in the .ascx file,
and it's initialized in the .aspx file.
 
A

ad

I find some document in MSDN, but I still not understand about this tag.

What is the function of TagPreFix and TagName?
 
M

Matt Berther

Hello ad,

<%@ Register TagPrefix="Portal" TagName="Title" Src="~/DesktopModuleTitle.ascx"%>

TagPrefix is the prefix used for the tag and TagName is the name (after the
:) of the tag. Given the above example, you'd use this in an aspx file

<Portal:Title id="someId" runat="server"></Portal:Title>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top