TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vishvesh kasi
NA
5
0
i have developed on grid view in that need to render images..
Jul 21 2010 5:08 AM
i have developed some code in that need to render image ..I have these images in my database.i m using code like the below ..
i m getting other column but not getting the image...
asp code.
<asp:GridView ID="GridView1" runat="server" Height="35px" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
Style="margin-top: 0px" Width="170px" AutoGenerateColumns="False">
<RowStyle Font-Size="Smaller" ForeColor="#475965" />
<Columns>
<asp:BoundField DataField="Ticker" HeaderText="Company Ticker" InsertVisible="False"
ReadOnly="True" SortExpression="Ticker" />
<asp:TemplateField HeaderText="Company">
<ItemTemplate>
<asp:Image ID="Image1" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle Font-Size="Smaller" ForeColor="#666666" />
<EditRowStyle Font-Size="Smaller" />
</asp:GridView>
c# code
System.Data.DataSet ds2 = new System.Data.DataSet();
string cmText = "SELECT * FROM images WHERE TICKER=" + "'" + ticker + "'";
SqlDataAdapter da1 = new SqlDataAdapter(cmText, con);
da1.Fill(ds2);
GridView1.DataSource = ds2;
GridView1.DataBind();
Please suggest where i m going mistake...
Reply
Answers (
1
)
XML serialization with Boolean variables
Tree In Asp.net