开始做的时候,一直提示我下面这句话。怎么都不能用
Sys.WebForms.PageRequestManageServerErrorException:An unknow error occurred while processing the request on the server .The status code returned from the server was:404
我全部关掉以后再做一次就没问题了,很奇怪的。谁能告诉我一下是为什么啊?
-----------------------------------------------------------------
这个控件可以使用二维数组来表示控件所显示在浏览器里的各个位置
00 | 01 | 02
-------------
10 | 11 | 12
-------------
20 | 21 | 22
这个就代表了控件的各个位置,依靠控件的.HorizontalSide和.VerticalSide的属性来表示水平和垂直位置。
我使用了一个DropDownList来控制位置,在SelectedIndexChanged事件里是这么写的
switch (this.DropDownList1.SelectedValue[0])
{
case '0':
avce.VerticalSide = VerticalSide.Top;
break;
case '1':
avce.VerticalSide = VerticalSide.Middle;
break;
case '2':
avce.VerticalSide = VerticalSide.Bottom;
break;
default:
avce.VerticalSide = VerticalSide.Middle;
return;
}
switch (this.DropDownList1.SelectedValue[1])
{
case '0':
avce.HorizontalSide = HorizontalSide.Left;
break;
case '1':
avce.HorizontalSide = HorizontalSide.Center;
break;
case '2':
avce.HorizontalSide = HorizontalSide.Right;
break;
default:
avce.HorizontalSide = HorizontalSide.Center;
return;
}
{
case '0':
avce.VerticalSide = VerticalSide.Top;
break;
case '1':
avce.VerticalSide = VerticalSide.Middle;
break;
case '2':
avce.VerticalSide = VerticalSide.Bottom;
break;
default:
avce.VerticalSide = VerticalSide.Middle;
return;
}
switch (this.DropDownList1.SelectedValue[1])
{
case '0':
avce.HorizontalSide = HorizontalSide.Left;
break;
case '1':
avce.HorizontalSide = HorizontalSide.Center;
break;
case '2':
avce.HorizontalSide = HorizontalSide.Right;
break;
default:
avce.HorizontalSide = HorizontalSide.Center;
return;
}
将一个Panel放到一个UpdatePanel里,再放一个AlwaysVisibleControlExtender,将TargetControlID属性指到Panel1,再一个下拉列表进去,就可以进行控制了!就不放样子了。把代码拿上来得了。
点此下载代码