HOME > .NET Framework > Forum > ช่วยเรื่องเพิ่มข้อมูลลงดาต้าเบสหน่อยครับ [code] using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq;
ช่วยเรื่องเพิ่มข้อมูลลงดาต้าเบสหน่อยครับ [code] using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq;
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class TestData : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
string ID, sqlInsert, sqlView,Show;
SqlConnection myConn = new SqlConnection();
myConn = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
sqlInsert = "INSERT INTO [User] (ID) VALUES (ID)";
ID = Request.QueryString["txtID"];
Response.Write("ID คือ " + Request.Form["txtID"]);
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Data.SqlClient.SqlConnection objConn;
using System.Data.SqlClient.SqlCommand objCmd;
public partial class TestData : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Line 12: using System.Xml.Linq;
Line 13: using System.Data.SqlClient;
Line 14: using System.Data.SqlClient.SqlConnection objConn;
Line 15: using System.Data.SqlClient.SqlCommand objCmd;
Line 16: