2 Replies - 365 Views - Last Post: 05 January 2012 - 09:29 PM Rate Topic: -----

#1 queendevil  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-January 12

how should i don't appear the white icon when fileupload saveas?

Posted 05 January 2012 - 06:30 AM

i use vb.net

i trying to do a file upload, i want to image to save to image folder, however, the image don't know appear in the directory that i indicate

if i click on "show all file", the image appear, but the image icon is blank or white like the image below show

so i click on that image and click on "include it in the project" , however, it shouldnt be the case that i everytime upload an image, i need to redo that again

**so how should i allow don't appear the white icon and to always appear in the upload folder when i upload a image instead of manually click on the image to include in ?**

is it visual studio problem? does i need to click on something to make the white icon disappear?
this is my code

     Protected Sub uploadImage()
        Dim filename As String = FileUploadImg.FileName
        Dim fileType As String = filename.Substring(filename.Length - 4).ToLower()
        If (fileType = ".gif") Or (fileType = ".jpg") Or (fileType = ".png") Then
            FileUploadImg.SaveAs("C:\Users\Jane\Desktop\project\FileUpload\FileUpload\WebRole1\images\" & txtboxName.Text & "_" & FileUploadImg.FileName)
        Else
            MsgBox("failed")

        End If
    End Sub

    Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click
           uploadImage()
           
            'End If
        End Sub



this is the image of how it look like


Posted Image

Is This A Good Question/Topic? 0
  • +

Replies To: how should i don't appear the white icon when fileupload saveas?

#2 demausdauth  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 176
  • View blog
  • Posts: 638
  • Joined: 03-February 10

Re: how should i don't appear the white icon when fileupload saveas?

Posted 05 January 2012 - 10:48 AM

That is only because the image isn't part of your project. And it should not be part of the project. When you upload a file you should be tracking it in the application so you can reference it.
Was This Post Helpful? 0
  • +
  • -

#3 queendevil  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-January 12

Re: how should i don't appear the white icon when fileupload saveas?

Posted 05 January 2012 - 09:29 PM

View Postdemausdauth, on 05 January 2012 - 05:48 PM, said:

That is only because the image isn't part of your project. And it should not be part of the project. When you upload a file you should be tracking it in the application so you can reference it.


u mean the image that i upload right? but i will need it to bind a image control...thereby when the user upload the image to the images folder i should be a able to use it....so how should i resolve the problem
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1