惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
U
Unit 42
The Register - Security
The Register - Security
S
Security Affairs
博客园 - 【当耐特】
Latest news
Latest news
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
F
Full Disclosure
C
Cisco Blogs
宝玉的分享
宝玉的分享
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
P
Privacy & Cybersecurity Law Blog
腾讯CDC
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Vulnerabilities – Threatpost
Jina AI
Jina AI
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 叶小钗
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园_首页
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Security Blog
Microsoft Security Blog
N
News and Events Feed by Topic
Recorded Future
Recorded Future
Scott Helme
Scott Helme
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
AWS News Blog
AWS News Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tor Project blog
F
Fortinet All Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hacker News: Front Page
J
Java Code Geeks
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
W
WeLiveSecurity
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
Attack and Defense Labs
Attack and Defense Labs

博客园 - 雪影

C#异步提示和技巧 关于System.Windows.Forms.DateTimePicker的一个Bug 关于frameset中指定区域回退的实现 如何编写出拥抱变化的代码? WCF RIA Services Domain Serive的生命周期和数据交互 [译]WCF RIA Services中的集合(2) [译]WCF RIA Services中的集合(1) windows8应用安装挂起的一个原因 WPF 详解模板 Silverlight --- Behavior技术(四) Silverlight --- Behavior技术(三) Silverlight --- Behavior技术(二) Silverlight --- Behavior技术(一) Silverlight的依赖属性与附加属性(六) Silverlight的依赖属性与附加属性(五) Silverlight的依赖属性与附加属性(四) Silverlight的依赖属性与附加属性(三) Silverlight的依赖属性与附加属性(二) Silverlight的依赖属性与附加属性(一)
从数据库读取图片,并固定显示
雪影 · 2006-10-18 · via 博客园 - 雪影

<asp:datagrid id="DG_Persons" Width="168px" HeaderStyle-HorizontalAlign="Center" Runat="server"
                            BorderColor
="Black" ItemStyle-BackColor="Beige" HeaderStyle-ForeColor="#ffffff" HeaderStyle-Font-Bold="True"
                            HeaderStyle
-BackColor="#ff0000" AutoGenerateColumns="False">
                            
<ItemStyle BackColor="Beige"></ItemStyle>
                            
<HeaderStyle Font-Bold="True" HorizontalAlign="Center" ForeColor="White" BackColor="Red"></HeaderStyle>
                            
<Columns>
                                
<asp:TemplateColumn HeaderText="图片">
                                    
<ItemTemplate>
                                        
<asp:Image id=Image3 Height="186px" ImageUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem, "imgid")) %>' Width="212px" Runat="server">
                                        </asp:Image>
                                    
</ItemTemplate>
                                
</asp:TemplateColumn>
                            
</Columns>
                        
</asp:datagrid>

 Private Sub BindGrid(ByVal id)

        
Dim strCnn As String = "server=.;database=master1;uid=sa;pwd="

        
Dim myConnection As SqlConnection = New SqlConnection(strCnn)
        
Dim dst As New DataSet
        
Dim sda As SqlDataAdapter
        
'Dim myCommand As SqlCommand = New SqlCommand("SELECT * FROM image1 where imageid=" & i, myConnection)
        sda = New SqlDataAdapter("SELECT * FROM KS_img where imgID=" & id, myConnection)
        
'myCommand.CommandType = CommandType.Text
        dst.Clear()
        sda.Fill(dst, 
"aaa")

        
Try

            myConnection.Open()
            row 
= table.NewRow
            
'row.Item("照片") = myCommand.ExecuteReader(CommandBehavior.CloseConnection)
            row.Item("imgid"= dst.Tables("aaa").Rows(0).Item(0)
            row.Item(
"Img"= dst.Tables("aaa").Rows(0).Item(1)
            
'row.Item("PersonImage") = dst.Tables("aaa").Rows(0).Item(2)
            'row.Item("PersonImageType") = dst.Tables("aaa").Rows(0).Item(3)
            table.Rows.Add(row)
            table.GetChanges()

            myConnection.Close()
            
Me.DG_Persons.DataSource = table
            
Me.DG_Persons.DataBind()

        
Catch SQLexc As SqlException

            Response.Write(
"Error occured while Generating Data. Error is " & SQLexc.ToString())

        
End Try

    
End Sub