Sorry I am still feel puzzled about your explanation, Can I take it like this:
I can visit the page with ListView control by click links from different pages, different pages transfer different values to the ListView page, then I retrieve image info from database table according to these different values.
I write a simple demo to show what I expressing:
create table(different pages mapping different images):
CREATE TABLE [dbo].[Page2Image](
[page_url] [nvarchar](50) NOT NULL,
[image_url] [nvarchar](50) NOT NULL,
[ext] [nvarchar](50)
)
I am sorry I can't understand your meaning accurately, if you sent your code and explain it more clear, I can help you. You can refer to this temporary.
Johnson-zhu
Member
340 Points
45 Posts
Re: Listview Control validation
Apr 09, 2012 09:41 AM|LINK
Hi,
Sorry I am still feel puzzled about your explanation, Can I take it like this:
I can visit the page with ListView control by click links from different pages, different pages transfer different values to the ListView page, then I retrieve image info from database table according to these different values.
I write a simple demo to show what I expressing:
create table(different pages mapping different images):
.aspx page:
<asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1"> <LayoutTemplate> <span id="itemPlaceholder" runat="server"></span> </LayoutTemplate> <ItemTemplate> Hello, You come from <%# Eval("page_url") %><br /> <img src='<%# Eval("image_url") %>' alt="" /> <hr /> </ItemTemplate> </asp:ListView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=.\SQLEXPRESS;Initial Catalog=TestDB;Integrated Security=True" ProviderName="System.Data.SqlClient" > </asp:SqlDataSource>code-behind:
string url = Request.QueryString["from"]; SqlDataSource1.SelectCommand = "SELECT * FROM [Page2Image] where [page_url]=@url"; SqlDataSource1.SelectParameters.Add("url", url);links of different pages:
I am sorry I can't understand your meaning accurately, if you sent your code and explain it more clear, I can help you. You can refer to this temporary.
If you still have any doubts, welcome ask me.