使用文件上传控件进行锚定 [英] Anchoring with a fileupload control

查看:94
本文介绍了使用文件上传控件进行锚定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在asp .net页面底部使用文件上传控件.当我单击此页面上的某个按钮时,它将文件上传到Web服务器.问题是页面无法锚定,因此回发后用户必须向下滚动到fileupload控件.

解决方案

上传后,您要滚动页面到文件上传控件吗?如果不是,那么如何将页面锚定到文件上传控件?"中的锚定页面"是什么意思?


将MaintenanceScrollPositionOnPostback ="true"添加到页面指令中.

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



是,在回发后将页面保持在滚动位置.


是的,上传后,我确实希望将页面滚动到文件上传控件.


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?

解决方案

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? "


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.


Yes, after uploading I do want to scroll the page to the file upload control.


这篇关于使用文件上传控件进行锚定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆