Where can I find some reference materials on ASP.net database submission forms -
I am new to asp.net, looking for a tutorial that will tell me how to create a web with many text boxes Submit this information in the database tables on the user by submitting the registration form, dropdown, and pressing the submit button.
I searched but nothing has been done till now.
If you see that there is a ton of tutorials especially about data access via asp.net, however you have to I suspect that I have posted this for "Over-Communication" which you are after.
What you want to do in your simplest is your ASPX page, call it at default .aspx and it has the following:
Now in your codebihnd file (.aspx.cs file) you want an event handler for the click event of my button
protected myButton_Click (object sender , EventArgs e) {var myConnectionString = "The connection string goes here"; (SqlConnection conn = new SqlConnection (myConnectionString)) (SqlCommand CMD = New SqlCommand ("INSERT dbo.mytable (fieldName) VALUES (@ value1)", conn) {cmd.Parameters.Add (new SqlParameter ("@ Value 1 ", myTextBox.Text)); cmd.ExecuteNonQuery ();}}}
The above example code, the database is very primary, and I strongly suggest Let me read some tutorials on asp.net/learn and elsewhere on net (on net) maybe MSDN documents for SQL Commands, SQLPremmitter and SQL connections too) That's what they are to learn the how they work.
Comments
Post a Comment