코딩 문제가 있습니다.오류 : 이름 'you'이 (가) 현재 컨텍스트에 없습니다.
Error:The name 'you' does not exist in the current context.. the ID already exist in the Default.aspx
<asp:DropDownList ID="you" runat="server">
<asp:ListItem>zed</asp:ListItem>
<asp:ListItem>joey</asp:ListItem>
<asp:ListItem>john</asp:ListItem>
및하여 default.aspx.cs
string stat = you.SelectedValue.ToString();
하지만 프로그램을 디버깅 할 때, 그것은 '는'당신이이 아무튼 말 : 오류가되는 콘텐츠에 존재하지 않습니다. 이 오류가 발생하는 이유는 무엇이며 어떻게 해결할 수 있습니까?
다른 컨트롤을 같은 이름으로 정의했을 수 있습니다. – JayOnDotNet
IDE의 GUI를 통해 컨트롤을 추가 했습니까? – cHao
@cHao 입력하십시오 ... – stillLearning