SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
SqlCommand comm = conn.CreateCommand();
conn.Open();
comm.CommandType = CommandType.StoredProcedure;
comm.CommandText = "GET";
SqlParameter par = new SqlParameter("@get", 3);
comm.Parameters.Add(par);
comm.Parameters[0].Direction = ParameterDirection.Output;
comm.ExecuteReader();
ViewData["d"] = comm.Parameters["@get"].Value.ToString();
conn.Dispose();
conn.Open();
comm.CommandType = CommandType.StoredProcedure;
comm.CommandText = "GET";
SqlParameter par = new SqlParameter("@get", 3);
comm.Parameters.Add(par);
comm.Parameters[0].Direction = ParameterDirection.Output;
comm.ExecuteReader();
ViewData["d"] = comm.Parameters["@get"].Value.ToString();
conn.Dispose();
转载于:https://blog.51cto.com/yuzhaokai/250624