내가 잘 작동 내가 내 개발 PC에서 실행이 오류CS1061은 (당신은 using 지시문 또는 어셈블리 참조가
CS1061:'ASP.dashboard_aspx' does not contain a definition for 'Button6_Click' and no extension method 'Button6_Click' accepting a first argument of type 'ASP.dashboard_aspx' could be found (are you missing a using directive or an assembly reference?)
을 얻고있다, 그러나 나는 서버에 업로드 할 때주는? 이 오류
소스 오류 :.
Line 252:
Line 253: </td><td>
Line 254:<asp:Button ID="Button3" runat="server" BackColor="#FF9933" ForeColor="White" Height="30px" Text="Search" Width="129px" OnClick="Button3_Click" Visible="False" />
Line 255: </td>
Line 256: </tr>
내 CS 파일 :
<asp:Button ID="Button3" runat="server" BackColor="#FF9933" Font-Size="Large" ForeColor="White" Height="30px" OnClick="Button3_Click" Text="Search" Visible="False" Width="200px" />
뒤에
코드 :
protected void Button3_Click(object sender, EventArgs e)
{
conn = new SqlConnection(strcon);
conn.Open();
DataTable dt = new DataTable();
cmd = new SqlCommand("select * from AssignedProject where [email protected]", conn);
cmd.Parameters.AddWithValue("@Projectid", DropDownList2.Text);
da = new SqlDataAdapter(cmd);
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Label16.Text = "View FTEs Details";
GridView5.Visible = true;
GridView2.Visible = false;
GridView5.DataSource = dt;
GridView5.DataBind();
}
else
{
Label16.Text = " On Going Project";
loadGV();
}
conn.Close();
}
나는 것을 시도했다 : 1. 깨끗하고 2. 3. 조사 함 버튼 및 이벤트를 다시 다시 그리고 그들은 @Page는 이미 <에서 상속 태그를 추가했다 . 아무 것도 작동하지 않는 것 같습니다. 그것은 하루 전 서버에서 실행되는 것처럼 혼란 스럽습니다. 그때부터이 버튼과 드롭 다운리스트를 추가했습니다.
내가 누락 된 경우 알려 주시기 바랍니다. 감사합니다
당신의 onclick 함수 이름이 일치하지 않습니다 – qamar
'Button6_Click'??? 코드 뒤에는 어디에 있습니까? –
이전에 죄송합니다. 변경 사항을 새로 고칠 수 없습니다. 편집 됨 – mark