Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using a fileupload control towards the bottom of my asp .net page. When I click on a certain button on this page it uploads a file to the webserver. The probelm is that the page does not anchor so after the post back the user has to scroll back down to the fileupload control. How can I anchor the page to the fileupload control?
Posted

After uploading do you want to scroll page to the file upload control? if no then what do you mean "anchor the page" in "How can I anchor the page to the fileupload control? "
 
Share this answer
 
Add MaintainScrollPositionOnPostback="true" to your page directive.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PaymentScheduleByAgency.aspx.cs" Inherits="BBCApplication.Staff.PaymentScheduleByAgency"  MasterPageFile="~/Site2.Master" MaintainScrollPositionOnPostback="true"%>


This will keep your page to the scrolled position after postback.
 
Share this answer
 
Comments
dptalt 19-Oct-10 12:53pm    
I already tried using MaintainScrollPositionOnPostback="true". It did not work. I think it does not work because the fileupload control requires a full post back.
Yes, after uploading I do want to scroll the page to the file upload control.
 
Share this answer
 
Comments
Sandeep Mewara 19-Oct-10 2:34am    
Not an answer. Use 'Add Comment' feature to interact with answerer.

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