TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hazel Mahmud
1.4k
315
69.5k
serialization a fileupload
May 11 2015 9:24 PM
i have a problem where my fileupload gave an error as below image. how do i fix it.. i attach my code as well below. please someone help me. My session state is InProc.
aspx.cs code :
if (Session["FileUploadPerjanjian"] == null && FileUploadPerjanjian.HasFile)
{
Session["FileUploadPerjanjian"] = FileUploadPerjanjian;
lblperjanjian.Text = FileUploadPerjanjian.FileName;
}
//// Next time submit and Session has values but FileUpload is Blank
//// Return the values from session to FileUpload
else if (Session["FileUploadPerjanjian"] != null && (!FileUploadPerjanjian.HasFile))
{
FileUploadPerjanjian = (FileUpload)Session["FileUploadPerjanjian"];
lblperjanjian.Text = FileUploadPerjanjian.FileName;
}
//// Now there could be another sictution when Session has File but user want to change the file
//// In this case we have to change the file in session object
else if (FileUploadPerjanjian.HasFile)
{
Session["FileUploadPerjanjian"] = FileUploadPerjanjian;
lblperjanjian.Text = FileUploadPerjanjian.FileName;
}
Reply
Answers (
2
)
populating other columns of gridview based on first column
how to focus mdi parent form control when i close child form