asp.net,通过SQL查询,将结果保存到DataTable的对象中,前台页面有一个asp:GridView标签, 10
通过SQL查询,将结果保存到DataTable的对象中,前台页面有一个asp:GridView标签,为什么<asp:BoundField中的DataField的值的名称要...
通过SQL查询,将结果保存到DataTable的对象中,前台页面有一个asp:GridView标签,为什么<asp:BoundField 中的DataField的值的名称要和SQL查询出来的名称一样?难道必须名称一样,才能在页面显示数据吗?DataTable和GridView直接是什么关系?为什么sql中以空格还要取个别名如下tp_date?
以下是SQL和GridView:
string l_sql = "select distinct icn23,wicp02,wicp03,wico01,wico04,wico07,wico08,wicomsk,wico03,wico05,wico06," +
"rtrim(wico20) as wico20,wicp17d + ' '+wicp17t wicp17d,' ' tp_date,wicp18d + ' '+wicp18t wicp18d,ikh01,wicp21,wicp24-wicp29 as wicp24,wico12,wico32,wicp10,wicp11,wicp15," +
"wihi05,icn16,icn27,'' as iil12,'' as cDate,'' as hold_date, substring(wico12,9,1) priority, wihi03 ";
<asp:BoundField DataField="wico03" HeaderText="Customer" SortExpression="wico03">
<HeaderStyle Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundField>
<asp:BoundField DataField="wico01" HeaderText="I/Lot">
<HeaderStyle Wrap="False" />
<ItemStyle Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="tp_date" HeaderText="TP开工日期"
SortExpression="tp_date" DataFormatString="{0:yyyy/MM/dd HH:mm:ss}">
<HeaderStyle Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundField> 展开
以下是SQL和GridView:
string l_sql = "select distinct icn23,wicp02,wicp03,wico01,wico04,wico07,wico08,wicomsk,wico03,wico05,wico06," +
"rtrim(wico20) as wico20,wicp17d + ' '+wicp17t wicp17d,' ' tp_date,wicp18d + ' '+wicp18t wicp18d,ikh01,wicp21,wicp24-wicp29 as wicp24,wico12,wico32,wicp10,wicp11,wicp15," +
"wihi05,icn16,icn27,'' as iil12,'' as cDate,'' as hold_date, substring(wico12,9,1) priority, wihi03 ";
<asp:BoundField DataField="wico03" HeaderText="Customer" SortExpression="wico03">
<HeaderStyle Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundField>
<asp:BoundField DataField="wico01" HeaderText="I/Lot">
<HeaderStyle Wrap="False" />
<ItemStyle Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="tp_date" HeaderText="TP开工日期"
SortExpression="tp_date" DataFormatString="{0:yyyy/MM/dd HH:mm:ss}">
<HeaderStyle Wrap="False"></HeaderStyle>
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundField> 展开
2015-03-06
展开全部
与前用Form做页面发少知道.net运行机制前都整页面做Form象传给台程序
其实浏览器初始化候客户端服务器交互创立几象JSP知道几象 appcontrequestsession象
net几象进行再封装用几象传递数值!
其实浏览器初始化候客户端服务器交互创立几象JSP知道几象 appcontrequestsession象
net几象进行再封装用几象传递数值!
追问
几象是什么意思?没太明白,希望再解释下,谢谢
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询