计算机毕业设计源代码管理:
以下是引用片段: 以下代码比较繁琐,需要进一步改进: protected void LinkButton2_Click(object sender, EventArgs e) { //初始化选择的图片信息 HttpPostedFile myPhoto = this.UpPhoto.PostedFile; int myPhotoLength = myPhoto.ContentLength; Byte[] myPhotoArray = new byte[myPhotoLength]; Stream PhotoStream = myPhoto.InputStream; PhotoStream.Read(myPhotoArray, 0, myPhotoLength); if (Session["CurControl"].ToString() == "Add") { if (this.TextBox1.Text.Trim() == "") { this.TErr.信息标题不能为空>"; return; } try { if (myPhoto.ContentLength <= 0) { //如果不选图片 直接保存相应 信息 DataControl.ExecSql("insert into HBXX(xxbt,xxnr,xxlb,fbsj) values('" + this.TextBox1.Text.Trim() + "','" + this.Textbox3.Text.Trim() + "','" + this.DropDownList1.SelectedItem.Text + "','" + this.TextBox4.Text.Trim() + "')"); }
|
〖资料来源:计算机毕业论文 www.xiaoniu168.com〗
第7页为计算机毕业论文源代码管理2......