Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
sir i have online education website in which i have upload image on session for a particular user and when again user login oh at that time the image shoud be displayed for a particular user whose session is running.imige preview coding.
Posted
Comments
[no name] 7-Apr-12 16:52pm    
Ok. What do you need help with? Do you have a question?
sankyn1 7-Apr-12 18:15pm    
i want to show image on my home page when user login his image which he has uploades
[no name] 8-Apr-12 0:30am    
So again, what problem are you having? What have you tried? Use the improve question link to edit your question and explain in more detail what you have tried and what problems you are having.
Frank R. Haugen 7-Apr-12 19:07pm    
Are you using Google Translate? I have a problem understanding what you mean.

However I believe what you are asking is a way for you, in the "backend" of your website, to see a the "profile information" of whomever is logged in; Am I understanding you right?
[no name] 8-Apr-12 0:27am    
Are you using a translator? The OP has not mentioned anything close to user profiles.

You need to produce some HTML like
HTML
<img alt="Uploaded image" src="uploadedImage.png" />


If this is not clear, I don't know what to advise. This is way too elementary stuff to anyone who has an "online education website".

—SA
 
Share this answer
 
I hope this wil help you.
This Code is in Vb.net which is used to save file in folder
other way is to store in database.


This Line Is used to get the directory related to the current page
Understand Server.MapPath()


1.Dim strSavelocation As String = Server.MapPath("..")

Here I am taking the folder(directory) where i want to save the uploaded Images
My Folder name is "Customimage" which is in "Contents" folder
and my web page is in other folder


2.strSavelocation = strSavelocation & "/Contents/customimage/"

Here u take Image name being uploaded(ex.Codeproject.jpg)

3. strFileName = FileUpload1.FileName.ToString()

4. strSavePath = strSavelocation & strFileName

here you can check whether file with the same name exist
I am calling method to check file exist
which is at line 6.
Then saving that image file in the folder using saveas(pathtosave)
ext pathtosave="../contents/customiamge/codeproject.jpg"

and with this you have to store the file name with the customermaster table in database



5. If Not Check_file_Exist(strSavePath) Then


FileUpload1.SaveAs(strSavePath)
End If


6.Public Function Check_file_Exist(ByVal FileName As String) As Boolean
Try
If File.Exists(FileName) = True Then
Return True
Else
Return False
End If

Catch ex As Exception
Return False
End Try

End Function

Till here we saved file and its name with customer details
Now when user logged in take the file name from table and path for the folder(save image folder) and assing to src property of img tag


Thanks.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900