在按钮单击下阻止aspx页面跳转到顶部。 [英] Prevent aspx page jumping to the top portion under button click.

查看:74
本文介绍了在按钮单击下阻止aspx页面跳转到顶部。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

防止aspx页面跳转到按钮点击下方的顶部..我已经设置了更新面板但触发器是为fileupload和其他一些给定的...因此回发后发生....但我仍然希望aspx页面到保持原样......

Prevent aspx page jumping to the top portion under button click..I have set update panel but triggers are given for fileupload and few other given...Hence post back occurs....But still i want the aspx page to remain where it is...

推荐答案

在aspx的page指令中,添加:MaintainScrollPositionOnPostback =true



示例:

In the page directive of the aspx, add: MaintainScrollPositionOnPostback="true"

Example:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"

         MaintainScrollPositionOnPostback="true"  Inherits="_Default" %>


这篇关于在按钮单击下阻止aspx页面跳转到顶部。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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