作者szss8765 (天若有情)
看板KNU-IEC
标题[心得] 网际网路程式设计(3/17)
时间Fri Mar 20 00:19:34 2009
(用在空白处:作下拉式清单)
if (Page.IsPostBack) return;
StreamReader sr = new StreamReader(Server.MapPath("学号_score.txt"), System.Text.Encoding.Default);
Label[] 变数1 = new Label[11];
DropDownList[] 变数2 = new DropDownList[题数];
变数1[0] = Label1;变数1[1] = Label2;变数1[2] = Label3;变数1[3] = Label4;变数1[4] = Label5;
变数1[5] = Label6; 变数1[6] = Label7; 变数1[7] = Label8; 变数1[8] = Label9; 变数1[9] = Label10;
变数1[10] = Label11;
变数2[0] = DropDownList1; 变数2[1] = DropDownList2; 变数2[2] = DropDownList3; 变数2[3] = DropDownList4; 变数2[4] = DropDownList5;
变数2[5] = DropDownList6; 变数2[6] = DropDownList7; 变数2[7] = DropDownList8; 变数2[8] = DropDownList9; 变数2[9] = DropDownList10;
变数2[10] = DropDownList11;
for (int i = 0; i < 11; i++){
String 变数(过程1) = sr.ReadLine();
String 变数(过程2) = sr.ReadLine();
String 变数(过程3) = sr.ReadLine();
String 变数(过程4) = sr.ReadLine();
String 变数(过程5) = sr.ReadLine();
变数1[i].Text = 变数(过程1);
变数2[i].Items.Clear();
变数2[i].Items.Add(变数(过程2));
变数2[i].Items.Add(变数(过程3));
变数2[i].Items.Add(变数(过程4));
变数2[i].Items.Add(变数(过程5));}
sr.Close();
(用在按键)
string 变数1 = this.TextBox1.Text;
string 变数2 = Request.ServerVariables["REMOTE_ADDR"];
Response.Write("来自"+变数2+"的"+变数1+",你的得分是:"+score.ToString());
Datetime 变数3 = DateTime.Now;
string 变数4 = 变数3.ToString();
StreamWriter 变数5 = new StreamWriter(Server.MapPath("学号_score.txt"), true);
string 变数6 =变数2+" " + 变数1 + " " + 自己设定的.ToString() + "分..." + 变数4;
变数5 .WriteLine(C);
变数5 .Close();
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.132.148.79
1F:→ fpga:int i = 0; i < 11 <-------会执行11次 03/20 00:27
2F:→ szss8765:我是设定11题,变数2[10] = DropDownList11; 03/20 00:35
3F:→ szss8765:造成不便,请多见谅 03/20 00:37