* What is an ascx file?

Source: Internet
Author: User
Is the extension name of the user control file

When used, add
<% @ Register tagprefix = "xxxxxx" tagname = "XXXXXXXX" src = "XXXXXXX. ascx" %>
Then you can use it.
For example:
<% @ Register tagprefix = "uc1" tagname = "headermenu" src = "ascx/headermenu. ascx" %>

<Table>
<Uc1: headermenu id = "headermenu1" runat = "server"> </uc1: headermenu>
</Table>

 

 

This concept is different from the server-side include concept. The difference is that every user control placed on a page exists in its own namespace. Anyone who tries to use the server to include (the latter contains the script block of the server) on the traditional ASP page will immediately see the benefits of the namespace. If you have already tried it, it is easy to see that the traditional ASP page will generate a compilation error due to the redefinition of variables and script processes. During development using user controls, each instance of the control exists in a unique namespace on the page, therefore, the variable names and process names used in the user space do not conflict with each other, so you do not need to consider the number of instances on a page. TheCodeAnd functions can be accessed through a specific instance of the control.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.