如何使用attriviewts主题和创建日期在datagridview中滚动博客或新闻数据。 [英] how to scroll blog or news data in datagridview with attriviewts subject and create date.

查看:71
本文介绍了如何使用attriviewts主题和创建日期在datagridview中滚动博客或新闻数据。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,亲爱的大家。



如何使用attriviewts主题和创建日期在datagridview中滚动博客或新闻数据。



提前感谢。

解决方案

我自己的解决方案使用的代码



< asp:SqlDataSource ID =" SqlDataSource1" RUNAT = QUOT;服务器" ConnectionString ="<%


ConnectionStrings:dbJmblissConnectionString%>"

SelectCommand =" SELECT [title],[news],[PostDate]来自[tblNews]" EnableCaching =" True">

< / asp:SqlDataSource>

< marquee onmouseover =" stop()"的onmouseout = QUOT;启动()"利润率左= QUOT; 15px的"方向= QUOT;最多" scrollamount = QUOT; 2英寸宽度= QUOT; 300"高度= QUOT; 270" <% - 行为= QUOT;备用" - %GT; text-align =" justify">

< div style =" width:300px; font-size:17px;">



< asp:FormView ID =" FormView1"

runat =" server"

DataSourceID =" SqlDataSource1"

AllowPaging =" True"利润率左= QUOT; 14px的"文本对齐= QUOT;理由" >

< EditItemTemplate>

标题:

< asp:TextBox ID =" TitleTextBox" RUNAT = QUOT;服务器" Text ='<%#Bind(" title")%>'/>

< br />< br />

新闻:

< asp:TextBox ID =" NewsTextBox" RUNAT = QUOT;服务器" Text ='<%#Bind(" news")%>'/>

< br />< br />

PostDate :

< asp:TextBox ID =" PostDateTextBox" runat =" server"

Text ='<%#Bind(" PostDate")%>'/>

< br />

< asp:LinkBut​​ton ID =" UpdateButton" RUNAT = QUOT;服务器" CausesValidation =" True"

CommandName =" Update"文本= [更新" />

& nbsp;< asp:LinkBut​​ton ID =" UpdateCancelButton" runat =" server"

CausesValidation =" False"的CommandName = QUOT;取消]文本= QUOT;取消] />

< / EditItemTemplate>



< InsertItemTemplate>

标题:

< asp:TextBox ID =" TitleTextBox" RUNAT = QUOT;服务器" Text ='<%#Bind(" title")%>'/>

< br />< br />

新闻:

< asp:TextBox ID =" NewsTextBox" RUNAT = QUOT;服务器" Text ='<%#Bind(" news")%>'/>

< br />< br />

PostDate :

< asp:TextBox ID =" PostDateTextBox" runat =" server"

Text ='<%#Bind(" PostDate")%>'/>

< br />

< asp:LinkBut​​ton ID =" InsertButton" RUNAT = QUOT;服务器" CausesValidation =" True"

CommandName =" Insert"文本= QUOT;插入" />

& nbsp;< asp:LinkBut​​ton ID =" InsertCancelButton" runat =" server"

CausesValidation =" False"的CommandName = QUOT;取消]文本= QUOT;取消] />

< / InsertItemTemplate>

< ItemTemplate>

标题:

< asp:标签ID =" TitleLabel" RUNAT = QUOT;服务器" Text ='<%#Bind(" title")%>'/>

< br /> < br />

新闻:

< asp:Label ID =" NewsLabel" RUNAT = QUOT;服务器" Text ='<%#Bind(" news")%>'/>

< br /> < br />

PostDate:

< asp:Label ID =" PostDateLabel" RUNAT = QUOT;服务器" Text ='<%#Bind(" PostDate")%>'/>

< br />

< / ItemTemplate>

< PagerSettings Mode =" Numeric" />



< / asp:FormView>

< ; / DIV>< /选取框>

hello dear all of you.

how to scroll blog or news data in datagridview with attriviewts subject and create date.

thanks in advance.

解决方案

my self solution it's used code

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%


ConnectionStrings:dbJmblissConnectionString %>"
SelectCommand="SELECT [title], [news], [PostDate] FROM [tblNews]" EnableCaching="True">
</asp:SqlDataSource>
<marquee onmouseover="stop()" onmouseout="start()" margin-left="15px" direction="up" scrollamount="2" width="300" height="270" <%--behavior="alternate"--%> text-align="justify">
<div style="width:300px;font-size:17px;">

<asp:FormView ID="FormView1"
runat="server"
DataSourceID="SqlDataSource1"
AllowPaging="True" margin-left="14px" text-align="justify" >
<EditItemTemplate>
Title:
<asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("title") %>' />
<br /><br />
News:
<asp:TextBox ID="NewsTextBox" runat="server" Text='<%# Bind("news") %>' />
<br /><br />
PostDate:
<asp:TextBox ID="PostDateTextBox" runat="server"
Text='<%# Bind("PostDate") %>' />
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
&nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>

<InsertItemTemplate>
Title:
<asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("title") %>' />
<br /><br />
News:
<asp:TextBox ID="NewsTextBox" runat="server" Text='<%# Bind("news") %>' />
<br /><br />
PostDate:
<asp:TextBox ID="PostDateTextBox" runat="server"
Text='<%# Bind("PostDate") %>' />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
&nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Title:
<asp:Label ID="TitleLabel" runat="server" Text='<%# Bind("title") %>' />
<br /> <br />
News:
<asp:Label ID="NewsLabel" runat="server" Text='<%# Bind("news") %>' />
<br /> <br />
PostDate:
<asp:Label ID="PostDateLabel" runat="server" Text='<%# Bind("PostDate") %>' />
<br />
</ItemTemplate>
<PagerSettings Mode="Numeric"/>

</asp:FormView>
</div></marquee>


这篇关于如何使用attriviewts主题和创建日期在datagridview中滚动博客或新闻数据。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆