Tech
Forums
Jobs
Books
Events
Live
Learn
More
Training
Interviews
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
how to make file upload works properly
Joma Rajab
Aug 2 2016 7:11 AM
196
Reply
I am using file upload with post back trigger but when I attach file first time it is not accept unless attached again in the second time. In addition, without post back trigger it woks but uploading the whole page that why I tried to use trigger because without it the upload button stopped
Please help
protected
void
Upload(
object
sender, EventArgs e)
{
if
(FileUpload1.HasFile && ddlSelect.Text ==
"Document"
)
{
Code
for
Uploading file code
.
.
.
}
else
if
(FileUpload2.HasFile && ddlSelect.Text ==
"Video"
)
{
Code
for
Uploading video file
.
.
.
}
else
// {
// for both
if
(FileUpload1.HasFile && FileUpload2.HasFile && ddlSelect.Text ==
"Both"
)
.
.
.
.
{
}
asp code
for
trigger
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID=
"btnUpload"
/>
</Triggers>
</asp:UpdatePanel>
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to get Original password from PasswordHash?
How to integrate Facebook Authentication in ASP.NET Webform?