WEB开发技术基础试题(ASP.NET)
2021/11/28 1:10:00
本文主要是介绍WEB开发技术基础试题(ASP.NET),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
效果显示
HTML页面显示
HTML代码
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <h3>WEB开发技术基础试题</h3> <br /> 一、单选题(每小题25分,共50分)<br /> <br /> 1.asp.net文件的扩展名是()。<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="RadioButtonList1" ErrorMessage="选项不能为空" ForeColor="Red"></asp:RequiredFieldValidator> <br /> <br /> <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal"> <asp:ListItem>A.CS</asp:ListItem> <asp:ListItem>B.aspx</asp:ListItem> <asp:ListItem>C.asp</asp:ListItem> <asp:ListItem>D.ascx</asp:ListItem> </asp:RadioButtonList> <br /> <br /> 2.HTML是一种()。<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="RadioButtonList2" ErrorMessage="选项不能为空" ForeColor="Red"></asp:RequiredFieldValidator> <br /> <br /> <asp:RadioButtonList ID="RadioButtonList2" runat="server" RepeatDirection="Horizontal"> <asp:ListItem>A.机器语言</asp:ListItem> <asp:ListItem>B.编程语言</asp:ListItem> <asp:ListItem>C.标记语言</asp:ListItem> <asp:ListItem>D.汇编语言</asp:ListItem> </asp:RadioButtonList> <br /> <br /> 二、多选题(每小题25分,共50分)<br /> <br /> 1.下面所用的动态页面制作效果是()。<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="RadioButtonList1" ErrorMessage="选项不能为空" ForeColor="Red"></asp:RequiredFieldValidator> <br /> <br /> <asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatDirection="Horizontal"> <asp:ListItem>A.asp</asp:ListItem> <asp:ListItem>B.asp.net</asp:ListItem> <asp:ListItem>C.flash</asp:ListItem> <asp:ListItem>D.jsp</asp:ListItem> </asp:CheckBoxList> <br /> <br /> 2.一个asp.net网页通常由以下哪()两个独立的文件组成。<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="RadioButtonList2" ErrorMessage="选项不能为空" ForeColor="Red"></asp:RequiredFieldValidator> <br /> <br /> <asp:CheckBoxList ID="CheckBoxList2" runat="server" RepeatDirection="Horizontal"> <asp:ListItem>A.aspx设计页面</asp:ListItem> <asp:ListItem>B.html前台页面</asp:ListItem> <asp:ListItem>C.CS代码页面</asp:ListItem> <asp:ListItem>D.asp代码页面</asp:ListItem> </asp:CheckBoxList> <br /> <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="确定" /> <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="清除" /> <br /> <asp:Label ID="Label1" runat="server"></asp:Label> </div> </form> </body> </html>
事件代码
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { int score = 0; String result = null; result += "答正确的题目如下所示:<br><br>一、单选题(每小题25分,共50分)"; if (RadioButtonList1.Items[1].Selected == true) { result += "<br><br>1.asp.net文件的扩展名是:" + "<br><br>" + RadioButtonList1.SelectedItem.Text; score += 25; } if (RadioButtonList2.Items[3].Selected == true) { result += "<br><br>2.HTML是一种():" + "<br><br>" + RadioButtonList2.SelectedItem.Text; score += 25; } result += "<br><br>二、多选题(每小题25分,共50分)"; if (CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true) { result += "<br><br>1.下面所用的动态页面制作效果是():" + "<br><br>" + CheckBoxList1.Items[0].Text + "<br><br>" + CheckBoxList1.Items[1].Text; ; score += 25; } if (CheckBoxList2.Items[0].Selected == true && CheckBoxList2.Items[2].Selected == true) { result += "<br><br>2.一个asp.net网页通常由以下哪()两个独立的文件组成:" + "<br><br>" + CheckBoxList2.Items[0].Text + "<br><br>" + CheckBoxList2.Items[2].Text; score += 25; } Label1.Text = result + "<br><br>您的最后得分是:" + score; } protected void Button2_Click(object sender, EventArgs e) { Label1.Text = null; RadioButtonList1.Text = null; RadioButtonList2.Text = null; CheckBoxList1.Text = null; CheckBoxList2.Text = null; } }
这篇关于WEB开发技术基础试题(ASP.NET)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2022-03-01沐雪多租宝商城源码从.NetCore3.1升级到.Net6的步骤
- 2024-12-06使用Microsoft.Extensions.AI在.NET中生成嵌入向量
- 2024-11-18微软研究:RAG系统的四个层次提升理解与回答能力
- 2024-11-15C#中怎么从PEM格式的证书中提取公钥?-icode9专业技术文章分享
- 2024-11-14云架构设计——如何用diagrams.net绘制专业的AWS架构图?
- 2024-05-08首个适配Visual Studio平台的国产智能编程助手CodeGeeX正式上线!C#程序员必备效率神器!
- 2024-03-30C#设计模式之十六迭代器模式(Iterator Pattern)【行为型】
- 2024-03-29c# datetime tryparse
- 2024-02-21list find index c#
- 2024-01-24convert toint32 c#