asp.net面试答案补充1
被面试得有一部分题诗主观的,视自身情况吧,下面是我不会的了,查一查记下了。
1、net常用类库,网络的类库:
(1) ASP.NET自动导入的:
System
System.Collections
System.Text
System.Text.RegularExpressions
System.Web
System.Web.Caching
System.Web.SessionState
System.Web.UI
System.Web.UI.WebControls
Syste.Web.UI.HtmlControls
(2)System下一级别的命名空间包括
1、Collections:集合框架,如 Hashtable、List、Queue等等都在这里,尤其在vs2005里,又增加了泛形。
2、ComponentModel:用于创建.Net框架的组件基础类。
3、Configuration:提供了访问应用程序配置文件中信息的类。
4、Data:大多数人都用的到的类库,访问数据库对象。
5、Diagnostics:用于调试的类库,很少人会用到它,事实上这里有不少东西很有用,比如:Trace,这就和以前的MFC里的Trace一样的用处。
6、DirectoryServices:这也很少用到,但是估计以后会用的比较多,因为访问目录服务需要用到它,以后很多单点登陆的集成应用都要集成LDAP,这里就是提供如何访问LDAP目录服务的类。
7、Drawing:画图类库,即所谓的GDI+。
8、EnterpriseServices:企业级服务,事实上是包装了一层Com+事务的支持。用于分布式应用。
9、Globalization:国际化。
10、IO:最常用的类库,读写IO。
11、Management:提供了访问WMI管理设备的接口。事实上我觉得没多大用处,更经常是用以前的VC++ 6.0来处理这些WMI接口。
12、Messag
相关文档:
1. 打开新的窗口并传送参数: //传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="++"’)</script>")
//接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.为按钮添加对话框
Button1 ......
窗体代码:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using AgentObjects;
using SpeechLib;
using System.Web;
using System.Threading;
using System.Text.RegularExpressio ......
1.查询功能:
描述:通常在网页上根据点击查询按钮获得所要结果
例:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
-- =============================================
-- Author:冰霜
-- Create date: 2009-09-04
-- Description:查询
-- =============================================
Alter PROCEDURE ......
第一步:创建对象
第二步:设置属性
①pdsBooks.AllowPaging=true;
②pdsBooks.PageSize=5;
③pdsBooks.CurrentPageIndex=CurrentPage-1;
④pdsBooks.DataSource=BookManage.GetAllBooks();
第三步:绑定数据源
DataList1.DataList=pdsBooks;
DataList1.DataBind(); ......