Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Dear Friends,

You will be very much thankful if you solve the below problem.
Posted 15-Mar-13 2:25am
Edited 15-Mar-13 2:28am
v2
Comments
Tadit Dash at 15-Mar-13 7:30am
   
You will be very much thankful if you solve the below problem.
Are you sure ?
Anshulkumar608 at 15-Mar-13 7:41am
   
ya ofcours!!!
Sandeep Mewara at 15-Mar-13 7:50am
   
It does not work like this here.
 
Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1


using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;
using BU_AppCode;
using System.Data.SqlClient;
public partial class PopUp : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e) { }
    protected void btnSave_Click(object sender, EventArgs e)
    {     
        string SavePath2 = Server.MapPath("~/BU_Web1/UploadedFile/Einwilligung/");
        string fileNameList = "";
        if (fp_Makler.HasFile)
        {
            string SavePath1 = Server.MapPath("~/BU_Web1/UploadedFile/Maklerauftrag/");
            lb_Message.Text = "";
            string FileName1 = Path.GetFileNameWithoutExtension(fp_Makler.FileName);
            string FileExtension1 = Path.GetExtension(fp_Makler.FileName);
            float FileSize1 = fp_Makler.PostedFile.ContentLength;
            FileSize1 = FileSize1 / 1024;
            string uniqueName1 = "YourFileName";         
            SavePath1 = SavePath1 + uniqueName1 + FileExtension1;
            if (FileSize1 < 15360) //&& FileSize2 < 15360) //If file size less than 15 MB, Then contine it
            {
                fp_Makler.SaveAs(SavePath1);
                fileNameList += "," + uniqueName1 + FileExtension1;
            }
 
            else
            {
                lb_Message.Text = FileName1 + FileExtension1 + " Datei ist zu groß";
            }
 
        }
 if (fileNameList != "")
        {
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "SP_Fr_FileUpDate";
            SqlParameterCollection paramColl = cmd.Parameters;
            paramColl.AddWithValue("@fileNameList", fileNameList.Substring(1));
            paramColl.AddWithValue("@Kundennummer", Request.QueryString["Kundennummer"]);
            try
            {
                BU_UtilDB.ExecuteProcedure(cmd);
            }
            catch (Exception ex)
            {
              
            }
            Page.RegisterStartupScript("", "<script type='text/javascript'>window.opener.location.href='StatusBU.aspx';window.close()</script>");
 
        }
        else
        {
            lb_Message.Text = "Es wurde keine Datei zum Upload ausgewählt";
        }
}
}
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Kornfeld Eliyahu Peter 275
1 Maciej Los 214
2 Sergey Alexandrovich Kryukov 200
3 King Fisher 185
4 OriginalGriff 163
0 OriginalGriff 6,223
1 DamithSL 4,724
2 Maciej Los 4,196
3 Kornfeld Eliyahu Peter 3,894
4 Sergey Alexandrovich Kryukov 3,496


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 20 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100