Brief description of the role of the @ import command in the *. aspx File
Source: Internet
Author: User
[Test Site]
@ Import command.
[Occurrence frequency]
★★★★☆
[Answer]
The @ import command can declare the namespace to be used on the current page. If you need multiple namespaces, you only need to add multiple @ import commands.
[Analysis]
This topic examines whether the user has imported a namespace when writing an ASP. NET page. This command can be written in *. aspx file, user control file, master page file, or global. asax file. The compiling method is as follows: Code.
<% @ Import namespace = "system. Data" %>
The above code imports the "system. Data" namespace. If you import the namespace in the *. CS file, you should use using. Not all namespaces need to be explicitly imported ,*. the ASPX page automatically uses some important namespaces, such as the "System" namespace and "system. text and all web-centered namespaces.
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.