에 전달 된 매개 변수 내가 필요하지 않은 몇 가지 텍스트 상자를을 방해. 사용자가 MVC 2에서는 '널 (null)'로 전달됩니다 아무것도 입력하지 않으면 그것은으로 통과되었다 ' ""'MVC 1에 어떤 변경이를 위해 수용 할 수 있는가?MVC 2 변환 내 저장 프로 시저
public string Name { get; set; }
public string Offer{ get; set; }
public string AutoID { get; set; }
using (SqlConnection connect = new SqlConnection(connections))
{
SqlCommand command = new SqlCommand("Info_Add", connect);
command.Parameters.Add("autoID", SqlDbType.BigInt).Direction = ParameterDirection.Output;
command.Parameters.Add(new SqlParameter("name", Name));
//Offer now returns a null value, which cannot be passed
command.Parameters.Add(new SqlParameter("offer", Offer));
command.CommandType = CommandType.StoredProcedure;
connect.Open();
command.ExecuteNonQuery();
AutoID = command.Parameters["autoID"].Value.ToString();
}
, 덕분에 투표 댓글을 때 아래로 남겨주세요. 미안 해요 u는 무슨 뜻인지 이해하지 못했다 : –