使用文件上传控件进行锚定

编程入门 行业动态 更新时间:2024-10-25 16:21:38
本文介绍了使用文件上传控件进行锚定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在asp 页面底部使用文件上传控件.当我单击此页面上的某个按钮时,它将文件上传到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 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.

更多推荐

使用文件上传控件进行锚定

本文发布于:2023-11-05 09:35:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1560480.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控件   文件上传

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!