Exemplo n.º 1
0
    protected void btexp_Click(object sender, EventArgs e)
    {
        li.uid           = Session["uid"].ToString();
        li.fname         = lblfnamedata.Text;
        li.user_filename = lblfilename.Text;
        li.user_filepath = lblfilepath.Text;
        li.place         = txtplace.Text;
        li.topic_name    = txttopic.Text;

        if (FileUpload1.HasFile)
        {
            string FileName = Path.GetFileName(FileUpload1.PostedFile.FileName);
            FileUpload1.SaveAs(Server.MapPath("all_user_experience_pics/" + FileName));
            li.filename = FileUpload1.PostedFile.FileName;
            li.filepath = "all_user_experience_pics/" + FileName;
        }
        else
        {
            li.filename = "";
            li.filepath = "";
        }

        li.topic_desc = Editor1.Content;
        li.ip         = Session["ip_add"].ToString();

        li.insert_all_user_experience_details(li);

        Response.Redirect("history.aspx");
    }