QueryString + Session
private void LoadForm(string p_id)
{
session["sess_id"] = p_id;
protected void CheckBox1_CheckedChanged1(object sender, EventArgs e)
{string sSqlatualiza = "update TB_CONTATO_OFFLINE set Status='Mensagem lida!' where ID_CONTATO_OFFLINE=" + session["sess_id"].tostring();
SqlConnection cn =
new SqlConnection("Data Source=localhost;Initial Catalog=DB;Integrated Security=True"); SqlDataAdapter da = new SqlDataAdapter(sSqlatualiza, cn);
try
{
respostaEnvioLabel.Text = "Dados Atualizados com sucesso";
respostaEnvioLabel.Visible = true;}
catch (Exception ex)
{
respostaEnvioLabel.Text = "Ocorreu um erro ao atualizar:" + ex.Message;respostaEnvioLabel.Visible = true;}
Att,
Leonardo Rocha
Nenhum comentário:
Postar um comentário
Informações de contato
Nome:
E-mail:
Telefone: