在不使用表格的情况下在网页上放置控件 [英] positioning controls on web page without using table

查看:68
本文介绍了在不使用表格的情况下在网页上放置控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用拖放功能在网页上动态放置控件.我使用ajax拖放控件来做到这一点.但是将页面发回时,所有控件都重新定位到左上角(0,0位置),这是一个问题.有没有办法像在Windows .net中一样保持控件在回发中的位置或设置控件的位置.请回复.
感谢和问候

i have to position controls on web page dynamically using drag drop. i do it with the use of ajax dragdrop control. but there is a problem when page is posted back all the controls are repositioned to top left corner(0,0 position). is there any way to maintain position of controls on postback or set postion of controls like we do in windows .net. please reply.
thanks and regards

推荐答案

您必须在部分回发期间保持位置.为此,我们需要使用Sys.WebForms.PageRequestManager Class.它有两个事件beginRequest endRequest.在这些事件中,您必须捕获拖动的位置,然后再次设置位置.
在这里,我对gridview做过类似的应用程序,用于在部分回发期间保持滚动位置.
在更新面板内部维护GridView滚动位置和标题 [
You have to maintain the position during partial postback. For that we need to use Sys.WebForms.PageRequestManager Class . It has two eevents beginRequest and endRequest . During those event you have to trap the dragged position and then set the position again.
Here, I have done a similar application with gridview, for maintaining scroll position during partial postback.
Maintain GridView Scroll Position and Header Inside Update Panel[^]

Hope this will help you :-D


这篇关于在不使用表格的情况下在网页上放置控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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