-3
Protected Sub ImageButton2_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton2.Click
Dim pa As String
pa = Server.MapPath("~\\Morfk\\")
TextBox4.Text = pa
FileUpload1.SaveAs(TextBox4.Text + FileUpload1.FileName)
sqlcon.Open()
Dim sqlcmd As New SqlCommand("INSERT INTO [aldia db].[dbo].[morfak] ([stnamei] ,[kiedi],[addressi],[morfk] ,[emaili],[nuphone])VALUES('" + TextBox1.Text + "','" + TextBox2.Text + "' ,'" + TextBox3.Text + "','" + FileUpload1.FileName + "' ,'" + TextBox5.Text + "'," + TextBox6.Text + ")", sqlcon)
sqlcmd.ExecuteNonQuery()
MsgBox("the process of sending Facility has done ")
sqlcon.Close()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
End Sub
実際に質問がありますか? –
TextBox3.Textに任意の名前を繰り返さないようにコードを追加する場所はどこですか? –
「何も繰り返さないようにする」とはどういう意味ですか?おそらく例が役に立ちます –