My namespace disappear in ASP.NET 2(beta2)?

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

   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 should 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 should be changed to MyNamespace._Default, right? add it, and press F5, OK, you got it, you first page run successfully! Congratulation!
   There're so many 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.

本文关键:My namespace disappear in ASP.NET 2(beta2)?
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top