Q: Adding date information in Datalist linkbutton There is a link button and an Image object within Datalist. I listed the activities here.
I wanna do this:When I attempt to click to links of the activities which is listed, I want to redirect to the etkinlikdetay.aspx page with date information.
protected void LinkButton1_Click(object sender, EventArgs e)
{
    cmd = new SqlCommand();
    cmd.Connection = c2;
    cmd.CommandType = CommandType.Text;
    cmd.CommandText = "select * from Etkinlik where EtkinlikTarih=@EtkinlikTarih";

    if (cmd.Connection.State == ConnectionState.Closed)
    {
        cmd.Connection.Open();
    }
    cmd.Parameters.AddWithValue("@EtkinlikTarih", SqlDbType.DateTime);
    Response.Redirect("Etkinlik.aspx?EtkinlikTarih=" + DateTime.Now.ToString("MM/dd/yyyy"));
}


A: Since you are passing the DateTime.Now as a querying string parameter, it would be better if you get the same data; DateTime.Now.ToString("MM/dd/yyyy") on Etkinlik.aspx.
I don't think you need to pass the date value in your current scenario since you can get the same one on other page.
