我在mysql db列中有一个datetime列,我需要在不同的日期和时间文本框中显示它.
我在db中的日期时间格式是2014-12-24 17:23:35.我想要:
Date : 2014-12-24
Time : 17:23:35
Run Code Online (Sandbox Code Playgroud)
我怎么能在c#中做到这一点?
我必须在另一个aspx页面的DIV部分中嵌入一个aspx页面。我必须在另一个aspx页面的部分中显示一个aspx页面
为此请帮我
如何根据条件为gridview的单元格文本赋予颜色.我有一个下面的gridview,我正在通过代码后面的gridview中获取数据.
<asp:GridView ID="GridView3" runat="server" AllowPaging="true" PageSize="5"
AutoGenerateColumns="false" Width="100%" OnPageIndexChanging="GridView3_PageIndexChanging"
CssClass="Grid">
<RowStyle CssClass="GridRow"/>
<Columns>
<asp:BoundField HeaderText="No" DataField="id" Visible="false"/>
<asp:BoundField HeaderText="Scenario" DataField="Scenario"/>
<asp:BoundField HeaderText="Type" DataField="Type"/>
<asp:BoundField HeaderText="Station Name" DataField="StationName"/>
<asp:BoundField HeaderText="Parameter" DataField="PARAM"/>
<asp:BoundField HeaderText="Value" DataField="Value"
SortExpression="Value" DataFormatString="{0:F2}"/>
</Columns>
<PagerStyle BackColor="White" Height="40px" Font-Bold="true" Font-
Size="Medium" ForeColor="Green" HorizontalAlign="Center"/>
<PagerSettings FirstPageText="First" LastPageText="Last"
Mode="NumericFirstLast" PageButtonCount="3" />
<HeaderStyle BackColor="#ABDB78" ForeColor="Black" Height="35px" Font-
Size="13px" Font-Names="verdana"/>
</asp:GridView>
Run Code Online (Sandbox Code Playgroud)
我通过后面的代码绑定数据与此网格.
protected void ReservGridBind()
{
string name = Request.QueryString[1].ToString();
string query = "SELECT SD.id,SD.Scenario,SD.Value,PR.Type,PR.StationName,PR.PARAM
from sgwebdb.param_reference as PR Inner join sgwebdb.scenario_data as …Run Code Online (Sandbox Code Playgroud)