- 追加された行はこの色です。
- 削除された行はこの色です。
閲覧総計:&counter(); (本日:&counter(today); 昨日:&counter(yesterday);)
<p><u><a href="https://gemwin.city/">Gemwin</a></u> là một cổng game trực tuyến phổ biến và được yêu thích, nổi tiếng với sự đa dạng và chất lượng cao của các trò chơi mà nó cung cấp. Với một giao diện hiện đại và thân thiện với người dùng, Gemwin thu hút người chơi từ khắp nơi trên thế giới.</p>
<p>#gemwin #gemwinclub #gemwin_casino</p>
<p><strong>Thông Tin Liên Hệ</strong>:</p>
<p><strong>Địa Chỉ</strong>: Đ. Phú Thịnh, Vạn Điểm, Thường Tín, Hà Nội</p>
<p><strong>GG MAP</strong> : <u><a href="https://goo.gl/maps/XEoXit68LYiwskhe9">https://goo.gl/maps/XEoXit68LYiwskhe9</a></u></p>
<p><strong>Số Điện Thoại</strong>: 564281068</p>
<p><strong>Email</strong>: gemwincity@gmail.com</p>
<p><strong>Website</strong>: <u><a href="https://gemwin.city/">https://gemwin.city</a></u></p>
<p><strong>Social:</strong></p>
<p>- Facebook: <u><a href="https://www.facebook.com/gemwincity/">https://www.facebook.com/gemwincity/</a></u></p>
<p>- Twitter: <u><a href="https://twitter.com/gemwincity">https://twitter.com/gemwincity</a></u></p>
<p>- Linkedin: <u><a href="https://www.linkedin.com/in/gemwincity/">https://www.linkedin.com/in/gemwincity/</a></u></p>
<p>- Pinterest: <u><a href="https://www.pinterest.com/gemwincity/">https://www.pinterest.com/gemwincity/</a></u></p>
<p>- Tumblr: <u><a href="https://gemwincity.tumblr.com/">https://gemwincity.tumblr.com/</a></u></p>
<p>- Youtube: <u><a href="https://www.youtube.com/@gemwincity/about">https://www.youtube.com/@gemwincity/about</a></u></p>
<p>- Wordpress: <u><a href="https://gemwincity.wordpress.com/">https://gemwincity.wordpress.com/</a></u></p>
<p>- Google Site: <u><a href="https://sites.google.com/view/gemwincity/">https://sites.google.com/view/gemwincity/</a></u></p>
<p>- Flick: <u><a href="https://www.flickr.com/people/gemwincity/">https://www.flickr.com/people/gemwincity/</a></u></p>
GridViewの特定単語の背景をクリーム色にし、本文中のどこに存在するかがひと目で
わかる様に強調表示する方法を確認した。 09/10/18
【方法】
#ref(RowDataBound21.JPG);
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
For i As Integer = 0 To e.Row.Cells.Count - 1
e.Row.Cells(i).Text = e.Row.Cells(i).Text.Replace("佐藤", "<B Style='background-color:#fff495'>佐藤</B>")
Next
End If
End Sub
開発環境:VWD2005 + Access2003
サーバ:ASP.NET2.0 + Access2003
【機能】GridViewの「佐藤」の文字の背景がクリーム色になり強調され、存在がひと
目で把握できる。
【稼働画面】
#ref(KeyWordEmphasize21.JPG);
Accessデータベース名:MeiboDB.mdb
テーブル名:MeiboTable2
|~フィールド名|~データ型|~フィールドサイズ|
|ID (主キー)|オートナンバー型|長整数型|
|namae|テキスト型|50|
|syussin|テキスト型|50|
※VWD2005、ASP.NET2.0環境ではAccess2007のDBファイル形式(*.accdb)は利用できな
い模様。DBファイルは「Acces2002-2003形式(*.mdb)」で保存して利用する。
「キーワード検索」機能稼働ページの全コード
【KeyWordEmphasize21.aspx】
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
For i As Integer = 0 To e.Row.Cells.Count - 1
If i = 1 Then
Dim hyl As HyperLink = CType(e.Row.Cells(1).Controls(0), HyperLink)
hyl.Text = hyl.Text.Replace("ASP.NET", "<B Style='background-color:#fff495'>ASP.NET</B>")
'TextBox1.Text &= hyl.Text
Else
'TextBox1.Text &= e.Row.Cells(i).Text
e.Row.Cells(i).Text = e.Row.Cells(i).Text.Replace("ASP.NET", "<B Style='background-color:#fff495'>ASP.NET</B>")
End If
Next
End If
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>GridViewのHyperLinkの特定単語の強調表示</title>
</head>
<body>
<form id="form1" runat="server">
<div>
GridViewのHyperLinkの特定単語の強調表示 09/10/25<br />
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
DataSourceID="AccessDataSource1" EmptyDataText="表示するデータ レコードがありません。" OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" />
<asp:HyperLinkField DataNavigateUrlFields="ISBN10" DataNavigateUrlFormatString="http://bookweb.kinokuniya.co.jp/htm/{0}.html"
DataTextField="書籍名" DataTextFormatString="{0}" HeaderText="書籍名HL" />
<asp:BoundField DataField="出版社" HeaderText="出版社" SortExpression="出版社" />
</Columns>
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="App_Data\honDB.mdb"
DeleteCommand="DELETE FROM `HonTable` WHERE `ID` = ?" InsertCommand="INSERT INTO `HonTable` (`ID`, `書籍名`, `出版社`, `ISBN10`) VALUES (?, ?, ?, ?)"
SelectCommand="SELECT `ID`, `書籍名`, `出版社`, `ISBN10` FROM `HonTable`" UpdateCommand="UPDATE `HonTable` SET `書籍名` = ?, `出版社` = ?, `ISBN10` = ? WHERE `ID` = ?">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="書籍名" Type="String" />
<asp:Parameter Name="出版社" Type="String" />
<asp:Parameter Name="ISBN10" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="書籍名" Type="String" />
<asp:Parameter Name="出版社" Type="String" />
<asp:Parameter Name="ISBN10" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
</asp:AccessDataSource>
<br />
<br />
<br />
</div>
</form>
</body>
</html>
【参考にしたページ】
なし
#comment_nospam
#vote(参考になった[0],ふつう[0],参考にならなかった[0])