/ Published in: C#
                    
                                        
Not that theres anything new to this. In fact its very old fashioned, but If you like me forget how its done; snip it.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
var connectionStr = ConfigurationManager.ConnectionStrings["myconnection"].ConnectionString;
cmd.Connection.Open();
cmd.CommandText =
"INSERT INTO myTable (email, bannerType, score, name, lastName, date) " +
"VALUES (@email, @bannerType, @score, @name, @lastName, @date)";
var rowsAffected = cmd.ExecuteNonQuery();
cmd.Connection.Close();
cmd.Connection.Dispose();
return rowsAffected;
Comments
 Subscribe to comments
                    Subscribe to comments
                
                