hello friends
i use visual basic for visual web developer
and i have below code.. i have 5 codes line.. how can i go to 2 code line from 5 code line ??
c = 0
second line
If System.IO.File.Exists("~ esimler") = True Then
c = c +1
i want to go to 2 code line from hereEnd If
Dim DestinationPath As String = "~ esimler" & c.ToString & FileUpload1.FileName
Mark as me if my question or my answer can be helpful for you :)
hello friends
i have solved this problem.. my code is below but i have new problem.. error codel line is FileUpload1.PostedFile.SaveAs(Server.MapPath(DestinationPath)) error message is your part of path was not found... anybody have a idea for this ??
cheers
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Clickc = 0
Dim **** As Label****:
Dim DestinationPath As String = "~ esimler" & c.ToString & FileUpload1.FileName
If System.IO.File.Exists(DestinationPath) = True Then
c = c + 1
GoTo ****End If
If FileUpload1.FileName <> "" Then
Dim filepath As String
filepath = DestinationPath
Dim ext As String = Path.GetExtension(filepath)If ext.ToLower() = ".jpg" Or ext.ToLower() = ".jpeg" Or ext.ToLower() = ".bmp" Or ext.ToLower() = ".png" Or ext.ToLower() = ".tif" Or ext.ToLower() = ".gif" Then
If Image1.ImageUrl = "" Then
FileUpload1.PostedFile.SaveAs(Server.MapPath(DestinationPath))
Image1.ImageUrl = DestinationPath
Mark as me if my question or my answer can be helpful for you :)