I havethe following code in my Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
if (Session["volow_member_id"] == null || Session["volow_member_guid"] == null)
{
Response.Redirect("Default.aspx");
}
if (!Page.IsPostBack)
{
get_channel();
}
}
and this code in my btnDelete in the same ASP.NET web page:
sql_connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["SQLdb"].ConnectionString);
sql_connection.Open();
sql_command = new MySqlCommand("sp_delete_channel", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
sql_command.Parameters.AddWithValue("param_member_channel_guid", RouteData.Values["GUID"].ToString()).MySqlDbType = MySqlDbType.VarChar;
// sql_command.Parameters.AddWithValue("param_volow_member_id", Convert.ToInt32(Session["volow_member_id"])).MySqlDbType = MySqlDbType.Int32;
sql_command.Para ...
Go to the complete details ...