I would like to be able to execute a stored procedure by clicking a button on my webpage. The stored procedure would be used to manipulate data in the underlying database, rather than returing data. I am using C# programming through VWD Express. Today is my first day of trying to use this software.
After reading a few articles on the web I thought that I would be able to create a void and use the sqlcommand function to do this (eg below). However VWD does not have this listed as an acceptable comment to use.
protection void Button1_Click ()
{
conn = new SqlConnection("Server=Server;DataBase=Database");
conn.open()
sqlcommand cmd = new sqlcommand ("EXEC ProcedureName", conn);
cmd.ExecuteReader;
}
I there any way I can execute a stored procedure through VWD express? Thank you.