protected void btnEnquire_Click(object sender, EventArgs e)
{
if(txtGameId.Text.Equals("") || !valid()){
lblTest.Text="You should enter the correct game id";
}
else
Response.Redirect("Test.aspx?Game_id='" + txtGameId.Text+"'");
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
Response.Redirect("Test.aspx?Game_id=" + GridView1.Rows[GridView1.SelectedIndex].Cells[1].Text);
}
public bool valid() {
int a = Convert.ToInt32(txtGameId.Text);
if (a > 852000 && a < 852003)
return true;
else
return false;
}
我怎样才可以从GridView中拿取Game_id这个数据,我现在是用bool hardcode掉 该怎样改掉呢?