When you create your first ASP. NET 2.0 web page. You may say: "Oh! ", There's no default namespace in your code-behind CS file? OK, let's add one, we think every object shocould be in one certain namespace. it's easy to add it, and then let's press F5 to run it. "what? Errors? I didn't do anything! Just add a namespace! ".
OK, calm down, let me explain it. When you add a namspace to you Aspx. CS file. Please turn to the corresponding aspx file. Look at this:
<% @ Page Language = "C #" autoeventwireup = "true" codefile = "default. aspx. cs" inherits = "_ default" %>
You see, current page is inherited from the _ default, it shocould be changed to mynamespace. _ default, right? Add it, and press F5, OK, you got it, you first page run successfully! Congratulation!
There're so far different things between ASP. NET 1.1 and 2.0. I'm sure, and I'm a beginner. Anyway, let's learn these things one by one.
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