sorry parakash for late response
man em using ur trick but i have found again same error...!
kindly tell me whatz de problem em in big trouble...!
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OLEDB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim con As New System.Data.OleDb.OleDbConnection
Dim myPath As String
myPath = Server.MapPath("nwind.mdb")
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data source=" & myPath & ";"
Dim myCommand As New System.Data.OleDb.OleDbCommand()
myCommand.CommandText = "INSERT INTO login(username,password)values('" + txtUsername.Text + "','" + txtPassword.Text + "')"
myCommand.Connection = con
con.Open()
myCommand.ExecuteNonQuery()
con.Close()
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
username
<asp:TextBox ID="txtUsername" runat="server" ></asp:TextBox>
<br />
<br />
password<asp:TextBox ID="txtPassword" runat="server"></asp:TextBox><br />
<br />
<asp:Button ID="btnsubmit" runat="server" OnClick="Button1_Click" Text="Button" /></div>
</form>
</body>
</html>
Enter your message below
Sign in or Join us (it's free).