偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

ASP.NET中aspx頁面

開發(fā) 后端
本文介紹在ASP.NET 2.0中,只需要在web.config里定義你要用的那些namespace,則在aspx頁面中就不需要再象1.1那樣。

看上去這個(gè)題目比較長(zhǎng),但實(shí)際上,我在看資料時(shí)發(fā)現(xiàn),這就是說,在ASP.NET 2.0中,只需要在web.config里定義你要用的那些namespace,則在aspx頁面中就不需要再象1.1那樣,用< %@ import namespace="system.text" %>來引用了。

比如,只需要在web.config中,以這樣的方式就可以了

  1. <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> 
  2. <system.web> 
  3. <pages> 
  4. <namespaces> 
  5. <add namespace ="System.IO" /> 
  6. <add namespace="System.Text"/> 
  7. </namespaces> 
  8. </pages> 
  9. </configuration> 
  10. </system.web> 

這樣一來,在所有的aspx頁面中(注意不是codebehind頁面),則不需要再用import的方法引入了.

同樣道理,在ASP.NET 1.1中,自定義控件的引用,在aspx頁面中也是很麻煩的,在ASP.NET 2.0中,可以在web.config中這樣定義

  1. <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> 
  2. <system.web> 
  3. <pages> 
  4. <namespaces> 
  5. <add namespace ="System.IO" /> 
  6. <add namespace="System.Text"/> 
  7. </namespaces> 
  8. <controls> 
  9. <add tagPrefix="uc" namespace="xx" 
  10. assembly="xxxx" /> 
  11. </controls> 
  12. </pages> 
  13. </configuration> 
  14. </system.web> 

【編輯推薦】

  1. ASP.NET的TypeConverter
  2. 淺析ASP.NET的TypeResolver
  3. ASP.NET中定義JavaScriptConverter
  4. 在ASP.NET中替換Sys.Services的方法
  5. 使用ASP.NET AJAX的Profile Service
責(zé)任編輯:佚名 來源: IT專家網(wǎng)
相關(guān)推薦

2009-10-19 15:14:48

aspx擴(kuò)展

2009-07-28 15:38:14

aspx文件編譯ASP.NET

2009-08-05 18:10:09

ASP.NET Def

2009-07-24 16:55:53

添加aspx頁面

2009-07-23 14:17:41

2009-07-29 17:26:39

ASP.NET頁面

2009-07-31 10:23:44

緩存頁面ASP.NET緩存

2009-07-27 03:23:00

Default.asp

2009-08-03 13:38:18

ASP.NET編程模型

2009-07-31 10:33:54

ASP.NET頁面輸出

2009-08-05 18:22:55

2009-07-23 10:52:38

2009-07-29 14:35:34

頁面輸出緩存ASP.NET

2009-07-21 15:40:59

Asp.Net動(dòng)態(tài)頁面

2009-07-28 16:40:11

ASP.NET異步頁面

2009-07-23 14:21:55

ASP.NET頁面

2011-06-08 10:28:15

ASP.Net

2009-07-27 15:58:25

添加GridView

2009-07-23 14:08:58

2009-07-31 13:06:53

CheckBoxLisASP.NET頁面
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)