webmatrix에서 많은 정적 정적 함수를 사용하여 App_Data에 DAL.cshtml을 만들었습니다.하나의 cshtml이 다른 cshtml에서 함수를 어떻게 호출합니까?
다른 .cshtml 페이지에서 다른 폴더로 보내고 싶습니다. 현재
나는 컴파일러 오류 메시지 : CS0103을 : 이름의 DAL은
(I가 단일 위치에 데이터 액세스 이동에 대한 블로그 다음 초보자있어주의) 현재 컨텍스트에 존재하지 않는 내 DAL.cshtml에서
예입니다 내 '호출'에서
public static void AddProfile (dynamic Profile)
{
var sql = "INSERT INTO profile (ProfileDescription, ProfileType) " +
"VALUES (@0, @1)";
PinwheelDB.Execute(sql, Profile.ProfileDescription, Profile.ProfileType);
var Profile.ProfileID = PinwheelDB.GetLastInsertId();
}
내가 가진 .cshtml :
dynamic Profile = new ExpandoObject();
Profile.ProfileDescription = Request.Form["txtChildFirstName"];
Profile.ProfileType = 1;
functions.DAL.AddProfile(Profile);
var vProfileID = Profile.ProfileID;
자신의 답을 받아 들여 문제를 해결 된 것으로 표시 할 수 있습니다. –