Losing images in GridView on postback


I've created this webpage where the client can update a page of events. They can also add an event including a photo. I'm very new at programming but I got the entire thing working. I went to upload it and everytime a button is clicked one of the photos disapears. I've looked all over the web for a way to fix it but most of the posts I don't understand. I realize it has something to do with the postback. Most of the code is in the aspx page. I have Enable ViewState="true" .
Should I post some of the code??
My coding is in vb
-1
designaire1
5/5/2009 4:19:11 AM
📁 asp.net.state-management
📃 8807 articles.
⭐ 0 followers.

💬 3 Replies
👁️‍🗨️ 2843 Views



Yes, but first make a small demo replicating the problem. The demo should be as small as possible. If you post 500 lines of code, very few will look through it. But do post your (trimmed) code as without that we can't help you too much.

All that glitters is gold-
Only shooting stars break the mold.
-1
HeartattacK
5/5/2009 4:29:03 AM
One thing to check for is ensure you're only data binding the data once.  If you bind the data to the control, then the photo's that the users upload won't persist until you save them to either your database or where you're referencing the data for the GridView.


Sincerely,
Malcolm Sheridan
Microsoft Certified Solution Developer
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as
Answer" if a marked post does not actually answer your question.
-1
malcolms
5/5/2009 5:22:15 AM

HI,
Yes,u should post the code what u have written the code for the image .
i wanted to know which event your are calling for showing the image..
Let me know
 

Regards 
Ravi
Please click "mark as answer" if this post helped you.
-1
ravi2k7
5/5/2009 7:11:08 AM
Reply: