here my code
protected void LinkButton1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{ }
}
protected void Button2_Click(object sender, EventArgs e)
{
Panel1.Visible = true;
}
fileupload is working when without asp panel. my question is when i put a asp panel it doesnt work. i handle panel visible from code behind
thanks
Suthish NairPosted Mar 17, 2011, 1:23 PM
Soft CornerPosted Mar 17, 2011, 4:48 AM
Updated Code :
Let me know if you still have any query :)
Lasantha PWPosted Mar 17, 2011, 4:29 AM
Soft CornerPosted Mar 17, 2011, 3:17 AM
The trick is to force the file upload control to perform a full postback, and we do this using triggers. Triggers allow the developer to specify what will cause partial and full postbacks. They must be defined within the
UpdatePanelbut outside of theContentTemplate. We want to create a trigger that will instruct the linkButton that you are using for the upload to perform a full postback.<
Triggers><asp:PostBackTrigger ControlID="LinkButton1" />
Triggers>Update Your Code with attached rar file...
Hope This will help you