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

推荐订阅源

S
Securelist
L
LangChain Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
月光博客
月光博客
S
Schneier on Security
Simon Willison's Weblog
Simon Willison's Weblog
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
美团技术团队
S
Security @ Cisco Blogs
人人都是产品经理
人人都是产品经理
L
LINUX DO - 热门话题
S
SegmentFault 最新的问题
D
DataBreaches.Net
C
CXSECURITY Database RSS Feed - CXSecurity.com
Microsoft Security Blog
Microsoft Security Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
N
News | PayPal Newsroom
W
WeLiveSecurity
F
Fortinet All Blogs
The Hacker News
The Hacker News
The Register - Security
The Register - Security
P
Palo Alto Networks Blog
Engineering at Meta
Engineering at Meta
T
The Exploit Database - CXSecurity.com
Vercel News
Vercel News
G
GRAHAM CLULEY
博客园 - 聂微东
P
Privacy International News Feed
P
Privacy & Cybersecurity Law Blog
Hacker News: Ask HN
Hacker News: Ask HN
Webroot Blog
Webroot Blog
G
Google Developers Blog
T
Tailwind CSS Blog
V
Vulnerabilities – Threatpost
L
Lohrmann on Cybersecurity
T
Tenable Blog
Cisco Talos Blog
Cisco Talos Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
云风的 BLOG
云风的 BLOG
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
B
Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Hugging Face - Blog
Hugging Face - Blog
T
Threatpost

博客园 - 雪影

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