asp.net信息列表怎么做

kevin_xu4365 2009-06-11 03:54:57
想实现如

姓名 学号 性别
英语系
aa 001 男
bb 002 女
。。。。
数学系
cc 008 男
dd 009 男
。。。。
这种表格,用2个repeater控件嵌套能实现吗?还有什么其他的好办法啊?在datalist中嵌套gridview不知道可行?多谢各位啊!

...全文
110 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
kevin_xu4365 2009-06-12
  • 打赏
  • 举报
回复
没有人顶啊
kevin_xu4365 2009-06-11
  • 打赏
  • 举报
回复
up一下
kevin_xu4365 2009-06-11
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 chuangwan 的回复:]
楼主 建议你使用 GridViewGroup 可以实现你需要的那种效果。
具体怎么用你可以到网上去找找资料,网上有比较完整的代码
[/Quote]

的确,效果就是这种的,你有没有完整的例子?可以用邮箱发给我。
xcydj 2009-06-11
  • 打赏
  • 举报
回复
mark
bjs007 2009-06-11
  • 打赏
  • 举报
回复
用2个GridView就可以
外边GridView绑定的是系的数据
里边的GridView绑定的是aa 001 男 的数据就可以了
chuangwan 2009-06-11
  • 打赏
  • 举报
回复
楼主 建议你使用 GridViewGroup 可以实现你需要的那种效果。
具体怎么用你可以到网上去找找资料,网上有比较完整的代码
WoooXVi 2009-06-11
  • 打赏
  • 举报
回复
3楼忒强
ViewState都搞出来了!
kevin_xu4365 2009-06-11
  • 打赏
  • 举报
回复
up一下
kevin_xu4365 2009-06-11
  • 打赏
  • 举报
回复
3楼的贴出那么多东西真是感动啊,可是不是贴错地方了?继续等待
zw_548498 2009-06-11
  • 打赏
  • 举报
回复
BS楼上
xiaoyu77582 2009-06-11
  • 打赏
  • 举报
回复
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default6.aspx.cs" Inherits="Default6" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>提示对话框</title>

<style type="text/css">
<!--
.STYLE1 {color: #EFF5FD}
.STYLE2 {color: #F6FAFB}
.STYLE3 {color: #FFFFFF}
-->
</style>



</head>
<body>




?
<script>
document.writeln("<style>");
document.writeln(".scrollWin{background:#fff; border-left:solid #0d94d7 3px;border-right:solid #0d94d7 3px; width:250px; position:absolute; right:50px; bottom:100px; display:none; overflow:hidden;z-index:10000;}");
document.writeln(".scrollWin .topArea{background:url(/images/scrollWin_top_1.gif) left top repeat-x; margin:0 0; text-align:center; overflow:hidden; padding:3px 0 0 0;height:17px;*padding:0;*height:20px; cursor:move;}");
document.writeln(".scrollWin .title{ font-size:12px;color:#fff; margin:0 0 0 3px;height:22px;line-height:22px;cursor:pointer;}");
document.writeln(".scrollWin .minimize{ position: absolute;right:22px; top:3px; background:url(/images/2008001y_03.gif) left top no-repeat; width:14px; height:14px; cursor:pointer;}");
document.writeln(".scrollWin .closewin{position: absolute;right:6px; top:3px; background:url(/images/2008001y_07.jpg) left top no-repeat; width:14px; height:14px; cursor:pointer;}");
document.writeln(".scrollWin .scrollWinLink{ line-height:20px;}");
document.writeln(".scrollWin .middleArea{float:left; display:inline; padding:0 0 0 0; height:110px; overflow:hidden;font-size:12px; text-align:center; vertical-align:middle;}");
document.writeln(".scrollWin .bottomArea{ float:left; width:100%; margin:8px 0 3px 0;}");
document.writeln(".scrollWin .showBtn{ float:left; background:url(/images/2008001y_18.jpg) left top no-repeat; width:57px; height:20px; margin:0 0 0 8px;}");
document.writeln(".scrollWin .scrollShowMore{float:right;font-size:12px;color:#797676; margin:-3px 8px 0 0;height:20px;line-height:20px;cursor:pointer;}");
document.writeln(".scrollWin .bottomArea .time{display:none;}");
document.writeln(".scrollWin .bottombg{background:#0d94d7;background:url(/images/scrollWin_bottom_1.gif) left top repeat-x; height:3px; font-size:1px;}");
document.writeln(".scrollWin .content{ width:92%; height:100%; text-align:left; text-indent:2em; margin:0 0 0 5px;}");
document.writeln(".scrollWin .middleArea a{ line-height:22px;}");
document.writeln("</style>");
</script>
<div class="scrollWin" id="scrollWin" style="z-index:10000;">
<div class="topArea" style="background-image: url(images/scrollWin_top_1.gif);background:#0d94d7;">
<span class="title">提示信息:</span>
<div class="minimize" id="minimize"></div>
<div class="closewin" id="closewin">
<img src="images/2008001y_07.jpg" alt ="消失" style="width: 14px" height="14"/></div>
</div>
<div class="middleArea" id="scrollContent">
<div id="wing" style="background:#9cdeff;"><table class="content">

<tr>
<td height="120" style="over-flow:hidden; width: 240px;">
<strong><span style="color: #0000ff; text-decoration: underline">测试信息</span></strong>1<br />
<strong><span style="color: #0000ff; text-decoration: underline">测试信息</span></strong>1<br />
<strong><span style="color: #0000ff; text-decoration: underline">测试信息</span></strong>1</td>
</tr>
<tr>
<td height="120" style="over-flow:hidden; width: 240px;">
<strong><span style="color: #0000ff; text-decoration: underline">测试信息</span></strong>2<br />
<strong><span style="color: #0000ff; text-decoration: underline">测试信息</span></strong>2<br />
<strong><span style="color: #0000ff; text-decoration: underline">测试信息</span></strong>2<br />
<strong><span style="color: #0000ff; text-decoration: underline">测试信息</span></strong>2</td>
</tr>

</table></div>
</div>

<div class="bottombg" style ="width :100%;background:#0d94d7;"> </div>
</div>
<script>
function isShowWin(){
//var dateStr = "2009/04/01 08:21:44";
//return (((new Date()).getTime() - new Date(dateStr))/60000) > 1440 ? false : true;
return true;
}
var scrollWinObj=function(i){var X=120;var k=260;var h=260;var l=27;var K=k-6;var V=X;var d=document.getElementById(i);var Q=document.getElementById("scrollContent");var W=document.getElementById("closewin");var a=document.getElementById("minimize");var J=this;var N=false;var T=true;var I=0;var H=0;var A=true;var C="m";var B;var D=function(){return parseInt(document.documentElement.scrollTop)};var c=function(){return parseInt(document.documentElement.clientWidth)};var U=function(){return parseInt(document.documentElement.clientHeight)};var R=function(o){d.style.left=parseInt(o)+"px"};var O=function(){return parseInt(d.style.left)};var P=function(o){d.style.top=parseInt(o)+"px"};var M=function(){return parseInt(d.style.top)};var n=function(){return m()+6};var f=function(){return Y()+l};var j=function(o){d.style.width=parseInt(o)+"px"};var m=function(){return parseInt(d.style.width)};var e=function(o){Q.style.height=parseInt(o)+"px";d.style.height=parseInt(Q.style.height)+22+"px"};var Y=function(){return parseInt(Q.style.height)};var b=function(o){I=o};var G=function(){return I};var Z=function(o){H=o-parseInt(document.documentElement.scrollTop)};var E=function(){return H};var g=function(){return U()-E()};var L=function(o){if(o==1){N=false;T=true;a.style.backgroundImage="url(images/flypic/2008001y_05.gif)";a.onclick=J.maximize;J.setCurrentClickState(0)}else{N=true;T=false;a.style.backgroundImage="url(images/flypic/2008001y_03.gif)";a.onclick=J.minimize;J.setCurrentClickState(1)}};var S=function(){d.style.display="none";J.setCurrentClickState(-1)};var F=function(){if(isShowWin()){d.style.display="block"}};this.init=function(){if(C=="m"){L(0);e(V)}else{if(C=="s"){L(1);e(0)}}j(K);var o=c();var p=U();W.onclick=this.closeWin;W.onmousedown=function(q){q=q?q:window.event;q.cancelBubble=true};a.onmousedown=function(q){q=q?q:window.event;q.cancelBubble=true};R(o-k);P(p-(l+Y())+D());I=o-k;H=p-(l+Y());F();if(A){d.onmousedown=function(r){r=r?r:window.event;var y=r.clientX,x=r.clientY;var AB=d.offsetLeft,AA=d.offsetTop;var w=y-AB,u=x-AA;if(document.addEventListener){document.addEventListener("mousemove",z,true);document.addEventListener("mouseup",q,true)}else{if(document.attachEvent){d.setCapture();d.attachEvent("onmousemove",z);d.attachEvent("onmouseup",q);d.attachEvent("onlosecapture",q)}else{var t=document.onmousemove;var v=document.onmouseup;document.onmousemove=z;document.onmouseup=q}}if(r.stopPropagation){r.stopPropagation()}else{r.cancelBubble=true}if(r.preventDefault){r.preventDefault()}else{r.returnValue=false}function z(AG){if(!AG){AG=window.event}var AD=AG.clientX-w;var AC=AG.clientY-u;if(AD>=0&&((AD+k)<=c())){R(AD);b(AD)}else{if(AD<0){R(0);b(0)}else{var AF=c()-k;R(AF);b(AF)}}if(AC>=D()&&((AC+f()-D())<=U())){P(AC);Z(AC)}else{if(AC<D()){P(D());Z(D())}else{var AE=U()-f()+D();P(AE);Z(AE)}}if(AG.stopPropagation){AG.stopPropagation()}else{AG.cancelBubble=true}}function q(AC){if(!AC){AC=window.event}if(document.removeEventListener){document.removeEventListener("mouseup",q,true);document.removeEventListener("mousemove",z,true)}else{if(document.detachEvent){d.detachEvent("onlosecapture",q);d.detachEvent("onmouseup",q);d.detachEvent("onmousemove",z);d.releaseCapture()}else{document.onmouseup=v;document.onmousemove=t}}if(AC.stopPropagation){AC.stopPropagation()}else{AC.cancelBubble=true}}}}window.onscroll=this.follow;window.onresize=this.follow};this.follow=function(){if(G()!=0||E()!=0){R(G());P(D()+E())}else{R(c()-n());P(D()+U()-f())}};this.maximize=function(){if(T){N=false;if(Y()<X){var o=Math.ceil((X-Y())/10);if(o>E()&&E()>0){o=E()}if(E()>0){P(M()-o);Z(M())}e(Y()+o);window.setTimeout(J.maximize,10)}else{N=true;L(0)}}};this.minimize=function(){if(N){T=false;if(Y()>0){var o=Math.ceil((Y())/10);e(Y()-o);P(M()+o);Z(M());window.setTimeout(J.minimize,10)}else{if(J.getCurrentClickState()==-1){J.minimize_width()}else{L(1);T=true}}}};this.minimize_width=function(){if(m()>0){var o=Math.ceil((m())/10);j(m()-o);R(O()+o/2);b(O());window.setTimeout(J.minimize_width,10)}else{if(J.getCurrentClickState()==-1){S();T=false;N=false}}};this.getState=function(){if(N){return 1}else{if(T){return 0}else{return -1}}};this.closeWin=function(){J.setCurrentClickState(-1);if(J.getState()==1){J.minimize()}else{if(J.getState()==0){J.minimize_width()}}};this.setCurrentClickState=function(o){B=o};this.getCurrentClickState=function(){return B};window.setTimeout(function(){J.init()},1000);};var s=new scrollWinObj("scrollWin");

function init_srolltext(){
marqueesHeight=125;
makewing = document.getElementById("wing");
makewing.scrollTop=0;
stopscroll=false;
with(makewing){
//style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
preTop=0; currentTop=marqueesHeight; stoptime=0;
makewing.innerHTML += makewing.innerHTML;
setInterval("scrollUp()",1);
}
function scrollUp(){
if(stopscroll==true) return;
currentTop++;
if(currentTop==marqueesHeight+1)
{
stoptime++;
currentTop--;
if(stoptime==300)
{
currentTop=0;
stoptime=0;
}
}
else {
preTop=makewing.scrollTop;
makewing.scrollTop++;
if(preTop==makewing.scrollTop){
makewing.scrollTop=marqueesHeight;
makewing.scrollTop++;
}
}
}
init_srolltext();
</script>



</body>
</html>
kevin_xu4365 2009-06-11
  • 打赏
  • 举报
回复
一个Repeater控件可以?英语系 数学系。。。也是查出来的啊,楼上的能详细点吗?多谢!
evaa006 2009-06-11
  • 打赏
  • 举报
回复
用一个Repeater控件就可以实现

62,064

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧