首页 > 解决方案 > 对象不包含“文本”的定义,并且找不到接受“文本”类型的第一个参数的可访问扩展方法“文本”

问题描述

private void button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=DESKTOP-U4DHN5E;Initial Catalog=parulsambyal.db;Integrated Security=True"); SqlCommand cmd = new SqlCommand(@"INSERT INTO [dbo].[register] ([Firstname] ,[lastname] ,[address] ,[gender] ,[email] ,[phone] ,[username] ,[password])值 ('" + txtFname.Text + "', '" + txtlastname.Text + "','" + txtaddress.Text + "','" + txtgender.Text + "','" + txtemail.Text + " ','" + txtphone.Text + "','" + txtusername.Text + "','" + txtpassword.Text + "')") } } }

标签: objecttextassembliesdefinition

解决方案


推荐阅读