急!!!请大家快来帮帮忙拉,谢谢,散分(datagrid和calendar的问题)

maifans 2003-08-21 01:43:35
为什么我在datagrid里加了按钮列和在calendar里放了hyperlink,但是一按就出错:“类型“Button”的控件“Button1”必须放在具有 runat=server 的窗体标记内。”,以前是在html的body里加一句:"<form id="a" runat="server"></form>"
就好了,但现在还是出错是为什么啊?救命拉!!!
...全文
32 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
念.夕夏 2004-03-08
  • 打赏
  • 举报
回复
试试这样吧!
<asp:table id="table1" runat="server" Height="80px" align="center">
<asp:TableRow align="center">
<asp:TableCell bgcolor="d6f7ff">
<asp:calendar id="c1" runat="server" Width="840px" Height="234px" BackColor="White" ShowGridLines="True"
DayNameFormat="Full" BorderColor="Silver" Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399" BorderWidth="1px">
<TodayDayStyle ForeColor="White" BackColor="#FF8080"></TodayDayStyle>
SelectorStyle BackColor="#FFCC66"></SelectorStyle>
<NextPrevStyle Font-Size="9pt" ForeColor="DarkGoldenrod"></NextPrevStyle>
<DayHeaderStyle Height="1px" BorderWidth="1px" BackColor="#E9EDF1"></DayHeaderStyle>
<SelectedDayStyle Font-Bold="True" BackColor="#CCCCFF"></SelectedDayStyle>
<TitleStyle Font-Size="9pt" Font-Bold="True" ForeColor="#404040" BackColor="#E9EDF1"></TitleStyle>
<OtherMonthDayStyle ForeColor="#CC9966"></OtherMonthDayStyle>
</asp:calendar>
</asp:TableCell bgcolor="d6f7ff">
</asp:TableRow align="center">
</asp:table>
sunny6281 2004-03-08
  • 打赏
  • 举报
回复
up
maifans 2003-08-21
  • 打赏
  • 举报
回复
<HTML>
<HEAD>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
</HEAD>
<body>
<form id="a" runat="server"><asp:datagrid id="DataGrid1" runat="server" CssClass="tablecontent" AutoGenerateColumns="False"
Width="496px" Height="32px">
<AlternatingItemStyle BackColor="#F3F3F3"></AlternatingItemStyle>
<ItemStyle Height="35px" BackColor="White"></ItemStyle>
<HeaderStyle Height="1px"></HeaderStyle>
<Columns>
<asp:BoundColumn Visible="False" HeaderImageUrl="file:///C:\Inetpub\wwwroot\efficiency\images\blank.gif"
DataField="noteID"></asp:BoundColumn>
<asp:ButtonColumn HeaderImageUrl="file:///C:\Inetpub\wwwroot\efficiency\images\blank.gif" DataTextField="title"
CommandName="show"></asp:ButtonColumn>
</Columns>
<PagerStyle NextPageText="下一页" PrevPageText="上一页" HorizontalAlign="Right"></PagerStyle>
</asp:datagrid><asp:calendar id="c1" runat="server" Width="840px" Height="234px" BackColor="White" ShowGridLines="True"
DayNameFormat="Full" BorderColor="Silver" Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399"
BorderWidth="1px">
<TodayDayStyle ForeColor="White" BackColor="#FF8080"></TodayDayStyle>
<SelectorStyle BackColor="#FFCC66"></SelectorStyle>
<NextPrevStyle Font-Size="9pt" ForeColor="DarkGoldenrod"></NextPrevStyle>
<DayHeaderStyle Height="1px" BorderWidth="1px" BackColor="#E9EDF1"></DayHeaderStyle>
<SelectedDayStyle Font-Bold="True" BackColor="#CCCCFF"></SelectedDayStyle>
<TitleStyle Font-Size="9pt" Font-Bold="True" ForeColor="#404040" BackColor="#E9EDF1"></TitleStyle>
<OtherMonthDayStyle ForeColor="#CC9966"></OtherMonthDayStyle>
</asp:calendar> </form>
</body>
</HTML>
代码很长,有关datagrid和calendar的就是上面这些。
cm8983 2003-08-21
  • 打赏
  • 举报
回复
贴出你的代码
lwgj 2003-08-21
  • 打赏
  • 举报
回复
把aspx页面代码代码贴出来看看
maifans 2003-08-21
  • 打赏
  • 举报
回复
是啊,我把form放在<body></body>之间的啊
datagrid和calendar都在里面的啊
就是:<body><form><asp datagrid></asp></form></body>这样的啊
acewang 2003-08-21
  • 打赏
  • 举报
回复
你查看一下源代码,看看datagrid 是否真的在你的"<form id="a" runat="server"></form>"里面
kuanglonggjf 2003-08-21
  • 打赏
  • 举报
回复
把具体的代码贴出来
jQuery EasyUI是一组基于jQuery的UI插件集合,而jQuery EasyUI的目标就是帮助web开发者更轻松的打造出功能丰富并且美观的UI界面。开发者不需要编写复杂的javascript,也不需要对css样式有深入的了解,开发者需要了解的只有一些简单的html标签 1.3.6更新 Bug treegrid: getChecked方法不能返回正确的行. fixed. tree: 异步树,在onlyLeafCheck:true时复选框不显示正确. fixed. Improvement treegrid:继承datagrid组件所有的selecting和checking方法。 linkbutton:图标对齐方式,支持值:'top','bottom','left','right'。 linkbutton:添加"size"属性,支持值:'small','large'。 linkbutton:添加的onClick事件。 menubutton:添加"menuAlign"属性,允许用户设置顶级菜单对齐。 combo:添加"panelAlign"属性,支持值:'left','right'。 calendar:"formatter"、"styler"和"validator"选项可用于自定义日历日期。 calendar:添加的onChange事件。 panel:添加"method","queryParams"和"loader"属性。 panel:添加"onLoadError"事件。 datagrid:添加"onBeginEdit"事件。 datagrid:添加"onEndEdit"事件。 datagrid:添加"sort"方法和"onBeforeSortColumn"事件。 datagrid:"combogrid"编辑器集成到datagriddatagrid:添加"ctrlSelect"属性,允许使用ctrl+click 多选 slider:添加"converter"选项,允许用户决定如何将一个值转换为滑块的位置或滑块位置值。 searchbox:添加"disabled"属性。 searchbox:添加"disabled","enable","clear","reset"方法。 spinner:添加"readonly"属性、"readonly"方法和"onChange事件。

62,046

社区成员

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

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

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

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