-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: nileshm
Message 8 in Discussion

Hi Amir,
please find the code
I have set "eneableViewstatemac " property to "true" first I am uploding file in temp 
folder and with the help of posted values  I am firing stored procedure in next page 
and on success I am moving file to correct folder else I am deliting the file many 
issues can come in this like error in page occurs in next page or error comes while 
deliting file so I want to upload file in next page Else I have option to do in same 
page ie. first page only. Is there any way so that I can uplod file in next page.
Here is part of code. 
******************************************************************************
Private Sub btnSubmit_ServerClick(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles btnSubmit.ServerClick
        'hidPhoto.Text = txtCollFile.PostedFile.FileName
        Try
            Call funUpload()
            Server.Transfer("npFileUploadSave.aspx", True)
        catch ex as System.Web.HttpException         Catch er As Exception         End 
Try
    End Sub     Private Sub funUpload() ' calling this upload function on button click
        Try             Dim FileToUpload As String
            FileToUpload = txtCollFile.PostedFile.FileName
            If FileToUpload.Length <> 0 Then
                Dim intPos As Integer
                Dim strPath As String
                intPos = FileToUpload.LastIndexOf("\")
                Dim Filename As String
                Filename = ""
                Filename = FileToUpload.Substring(intPos + 1, (FileToUpload.Length - 
intPos) - 1) 
               ' System.IO.Path.GetFileName(File1.PostedFile.FileName)
                hidFilename.Text = Filename
                Session("hidFilename") = Filename
                strPath = "F:\practice\upload\temp\" & Filename
                txtCollFile.PostedFile.SaveAs(strPath)             End If         
Catch ex As Exception
            Response.Write(" <br> Error is follows ")
            Response.Write(ex)
        Catch ex As System.Web.HttpException         End Try     End Sub
******************************************************************************  

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to