更多"[单选题]ET中,下列代码在页面中的输出结果是(选一项)
XmlDoc"的相关试题:
[单选题]以下代码能输出"OK"的代码是(选一项)
A.declare @num nvarchar(10)
@num = ‘OK’
Print @num
B.declare @num nvarchar(10)
@num = ‘OK’
Select @num
C.If( true )
Print ‘OK’
D.If( 1=1 )
Select ‘OK’
[单选题]在ADO.NET,以下是创建一个数据集的代码,下列能够正确输出“李四”的代码是(选一项)
DataSet ds = new DataSet();
DataTable dt = new DataTable();
dt.Columns.Add("name",typeof(System.String));
DataRow dr = dt.NewRow();
dr[0] = "李四";
dt.Rows.Add(dr);
ds.Tables.Add(dt);
A.Console.WriteLines(ds.Tables["name"].Rows[0][0]);
B.Console.WriteLines(ds.Tables[0].Rows[0]["name"]);
C.Console.WriteLines(ds.Rows[0][0]);
D.Console.WriteLines(ds.Rows["name"][0]);
[单选题]下面代码中读取的是( )区的数据(选一项)byte[] data=new byte[2];if(EPCSDKHelper.ReadTag(_handle,0x03,0x00,1,data,0)){ String str=Encoding.Default.GetString(data); MessageBox.Show(str);}
A.保留区
B.EPC区
C.TID区
D.用户区
[单选题]下面这段代码执行后,写入到标签里的数据是( )(选一项)byte[] data = new byte[12];data = Encoding.Default.GetBytes("0123456789ABCDEF");if (EPCSDKHelper.FastWriteTagID(_handle, 12, data, 0)){ MessageBox.Show("写入EPC编码成功");}else{ MessageBox.Show("写入EPC失败");}
A.0123456789ABCDEF
B.0123456789AB
C.0123456789
D.012345
[单选题]页面的IsPostBack属性用来判别页面(选一项)
A.是否需要回传
B.是否是回传的
C.是否启用回传
D.是否响应回传
[单选题]运行以下语句,输出结果是(选一项)
CREATE PROC proc_lookup
@mystuNo varchar(8)=NULL
AS
IF @mystuNo IS NULL
BEGIN
Print '您忘记了传递学号参数'
RETURN
END
SELECT * FROM stuInfo WHERE stuNO = @mystuNo
GO
Exec Proc_lookup
A.编译错误
B.调用存储过程Proc_lookup出错
C.显示:您忘记了传递学号参数
D.显示空的学员信息记录集
[单选题]ADO.NET中,要向DataTable对象中添加一列,以下C#代码正确的是(选一项)
A.myTable = new DataTable("Months");
myTable.Columns.Add("Month", string);
B.myTable = new DataTable("Months");
myTable.Columns.Add("Month", typeof(string));
C.myTable = new DataTable("Months");
myTable.Columns.Add("string",Month));
D.myTable = new DataTable("Months");
myTable.Columns.Add(string ,"Month"));
[单选题]C#中存储过程参数的( )属性表明它是输入还是输出参数(选一项)
A.DbType
B.ParameterName
C.Direction
D.SqlDbType
[单选题]在ASP.NET中,关于下列代码的说法正确的是(选一项)
HttpCookie user = new HttpCookie("name","王飞"); //1
Response.Cookies.Add(user); //2
user.Expires = DateTime.Now.AddMinutes(4); //3
A.代码行1错误
B.代码行2错误
C.代码行3错误
D.所有代码行正确
[单选题]用C#编写的网页后台代码被保存在 ( )文件中。(选一项)
A..aspx
B..vb
C..cs
D..config
[单选题]以下代码的输出结果是()
int []age = new int[]{16,18,20,14,22};
foreach(int i in age)
{
if(i>18) continue;
Console.Write(i.ToString()+” ”);
}
A.16 18 20 14 22
B.16 18 14 22
C.16 18 14
D.16 18
[单选题]以下代码的输出结果是()
string[] words = new string[] { "a", "b", "c" };
foreach (int word in words)
{
word ="abc";
Console.WriteLine(word);
}
Console.ReadKey();
A.a b c
B.abc abc abc
C.bc ac ab
D.不能正确编译
[单选题]以下代码的输出结果是()
int[] pins = new int[4]{9,2,3,1} ;
Console.WriteLine(pins[1]);
A.1
B.2
C.9
D.3
[单选题]在ASP.NET中,当针对整个页面调用()方法时,会计算页面上所有数据绑定表达式。(选一项)
A.Fill()
B.ReadXML()
C.DataBind()
D.DataBinder.Eval()
[单选题]下面T-SQL代码运行完的结果是(选一项)
declare @counter int
set @counter=1
while @counter<3
begin
set @counter=@counter+1
print @counter
break
print 'loop'
end
A.2
loop
B.2
C.2
loop
3
loop
D.2
3
[单选题]下面关于新增配置文件节点代码中应该填入的是( )(选一项)Configuration cf = ConfigurationManager.OpenExeConfiguration(“配置文件");cf.AppSettings.Settings.Add(“color”, “red”); //新增appSettings节点____________________;
A.ConfigurationManager.RefreshSection(“appSettings”)
B.cf.Save()
C.return cf
D.cf.AppSettings.Settings["color"].Value = status
[单选题]在ASP.NET中执行如下代码,没有得到正确结果,原因是(选一项)
public string Name{ get{ return"李小龙";}}
在Test.aspx页面中编写如下数据绑定表达式:<%#Name%>
A.在Test.aspx中绑定方式不对,应该用<%= %>代替<%# %>
B.属性定义错误
C.应在Page_Load方法中加入Page.DataBind();
D.以上答案都不对
[单选题]在SQL Server 2005中,给定如下的T-SQL代码,以下说法正确的是(选一项)
Create procedure price_proc(@count int output, @avg_price money output,@type Char(12)=’business’)as
Select @Count=count(*),@avg_price=Avg(price) from titles where type=@type
A.建立了存储过程price_price,所有参数都是输出参数
B.建立了存储过程price_price,返回的是用户指定图书种类的数量及平均价格
C.@Count=count(*)也可以使用@Count=count()代替
D.创建存储过程失败,因为Select语句中使用了聚合函数,因此必须使用Group By进行分组
[单选题]()命名空间中的类和接口用于创建Web 应用程序的页面(选一项)
A.System.Drawing
B.System.IO
C.System.Web.UI
D.System.Web.Service