datalist please help soon

M

mahsa

H
data I'm binding to the DataList is information about products in my product database. Perhaps passed in the QueryString to this page is a ProductID. I might want to make the item in the DataList that has the corresponding ProductID selected. In a similar vein, perhaps I want to have newest product selected by default. How can I acheieve this functionality
actuly i use pagin

<%@ Page language="c#" Codebehind="product.aspx.cs" AutoEventWireup="false" Inherits="nettest1.product" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML><HEAD><title>product</title><meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"><meta content="C#" name="CODE_LANGUAGE"><meta content="JavaScript" name="vs_defaultClientScript"><meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"><style>A.11pxblue { FONT-SIZE: 11px; COLOR: #00319b; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline
A.11pxblue:visited { FONT-SIZE: 11px; COLOR: #00319b; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline
A.11pxblue:hover { FONT-SIZE: 11px; COLOR: #00319b; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
</style></HEAD><body MS_POSITIONING="GridLayout"><form id="Form1" method="post" runat="server"><table width="75%" border="0"><tr><td>&nbsp
<table><TBODY><tr><td></td></td><td><asp:datalist id="Dtl_ProInfo" runat="server" RepeatColumns="1" RepeatDirection="Horizontal"><SeparatorStyle BorderStyle="Solid" BorderColor="Control"></SeparatorStyle><ItemTemplate><table width="87%" border="0"><tr><td><table width="75%" border="0"><tr><td>imgdaralist</td></tr><tr><td>click here for larger view</td></tr><tr><td>pre next</td></tr></table></td><td><table width="75%" border="0"><tr><td>img</td></tr><tr><td>Click to enlarge image<br></td></tr></table></td><td><table width="100%" border="0"><tr><td><table width="100%" border="0"><tr><td>Our Price</td><td><%# DataBinder.Eval(Container.DataItem, "OurPricePerUnit1","{0:c}") %></td></tr><tr><td></td><td>&nbsp;</td></tr><tr><td>Retail Price:</td><td><%# DataBinder.Eval(Container.DataItem, "RetailPrice","{0:c}") %></td></tr><tr><td>You save:</td><td><%# DataBinder.Eval(Container.DataItem, "SavedValue","{0:c}") %>(<%# DataBinder.Eval(Container.DataItem, "SavedPercentage","{0:c}") %>%)</td></tr></table></td
Nam
</tr><tr><td><table width="75%" border="0"><tr><td>img</td><td><a>Order Sample o
<%# DataBinder.Eval(Container.DataItem, "Name","{0:c}") %
(<%# DataBinder.Eval(Container.DataItem, "PartNo","{0:c}") %>)</a></td></tr></table></td></tr><tr><td><table width="75%" border="0"><tr><td>Warranty Protectio
</td></tr><tr><td>More Informatio
</td></tr><tr><td>Reviews &amp; Ratin
</td></tr><tr><td>Add to Wish Lis
</td></tr></table><br></td></tr></table></td></tr></table></ItemTemplate></asp:datalist><asp:linkbutton id="Prev" onclick="Page_DataList" runat="server" Width="105px"><< pre</asp:linkbutton><asp:linkbutton id="Next" onclick="Page_DataList" runat="server" Width="78px">next >></asp:linkbutton><INPUT id="CurrentPage" type="hidden" value="1" runat="server" NAME="CurrentPage"><INPUT id="PageSize" type="hidden" value="1" runat="server" NAME="PageSize"><INPUT id="TotalSize" type="hidden" runat="server" NAME="TotalSize"></td></TD></tr></table></TD><tr><td>&nbsp;</td></tr><tr><td>&nbsp
<asp:datalist id="DataList3" runat="server"></asp:datalist></td></tr><tr><td>&nbsp
<asp:datalist id="DataList4" runat="server"></asp:datalist></td></tr><tr><td>&nbsp
<asp:datalist id="DataList5" runat="server"></asp:datalist></td></tr><tr><td>&nbsp;</td></tr></TBODY></TABLE></form></body></HTML

how can i show for example row(5) first in datalist
 
M

Michael Tkachev

Hi,

Could you send me your sourse code please?

Michael

mahsa said:
Hi
data I'm binding to the DataList is information about products in my
product database. Perhaps passed in the QueryString to this page is a
ProductID. I might want to make the item in the DataList that has the
corresponding ProductID selected. In a similar vein, perhaps I want to have
newest product selected by default. How can I acheieve this functionality?
actuly i use paging

<%@ Page language="c#" Codebehind="product.aspx.cs"
AutoEventWireup="false" Inherits="nettest1.product" %><!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN"
<HTML><HEAD><title>product</title><meta content="Microsoft Visual Studio
..NET 7.1" name="GENERATOR"><meta content="C#" name="CODE_LANGUAGE"><meta
content="JavaScript" name="vs_defaultClientScript"><meta
content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema"><style>A.11pxblue { FONT-SIZE: 11px; COLOR: #00319b;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION:
underline }
A.11pxblue:visited { FONT-SIZE: 11px; COLOR: #00319b; FONT-FAMILY:
Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline }
A.11pxblue:hover { FONT-SIZE: 11px; COLOR: #00319b; FONT-FAMILY: Verdana,
Arial, Helvetica, sans-serif; TEXT-DECORATION: none }
</style></HEAD><body MS_POSITIONING="GridLayout"><form id="Form1"
method="post" runat="server"> said:
<table><TBODY><tr><td></td></td><td><asp:datalist id="Dtl_ProInfo"
runat="server" RepeatColumns="1"
RepeatDirection="Horizontal"><SeparatorStyle BorderStyle="Solid"
BorderColor="Control"></SeparatorStyle><ItemTemplate><table width="87%"
border="0"><tr><td><table width="75%"
border="0"><tr><td>imgdaralist</td></tr><tr><td>click here for larger
view</td></tr><tr><td>pre next</td></tr></table></td><td><table width="75%"
border="0"><tr><td>img</td></tr><tr><td>Click to enlarge
image<br></td></tr></table></td><td><table width="100%"
border="0"><tr><td><table width="100%" border="0"><tr><td>Our
Price</td><td><%# DataBinder.Eval(Container.DataItem,
"OurPricePerUnit1","{0:c}")
%></td></tr><tr><td></td><td>&nbsp;</td></tr><tr><td>Retail
Price:</td><td><%# DataBinder.Eval(Container.DataItem,
"RetailPrice","{0:c}") %></td></tr><tr><td>You save:</td><td><%#
DataBinder.Eval(Container.DataItem, "SavedValue","{0:c}") %>(<%#
DataBinder.Eval(Container.DataItem, "SavedPercentage","{0:c}")
%>%) said:
Name
</tr><tr><td><table width="75%" border="0"><tr><td>img</td><td><a>Order Sample of
<%# DataBinder.Eval(Container.DataItem, "Name","{0:c}") %>
(<%# DataBinder.Eval(Container.DataItem, "PartNo","{0:c}")
%>) said:
</td></tr><tr><td>More Information
</td></tr><tr><td>Reviews &amp; Rating
</td></tr><tr><td>Add to Wish List
</td></tr></table><br></td></tr></table></td></tr></table></ItemTemplate></a
sp:datalist><asp:linkbutton id="Prev" onclick="Page_DataList" runat="server"
runat="server" NAME="CurrentPage"><INPUT id="PageSize" type="hidden"
value="1" runat="server" NAME="PageSize"><INPUT id="TotalSize" type="hidden"
runat="server"
NAME="TotalSize"> said:
&nbsp;
<asp:datalist id="DataList3"
runat="server"> said:
<asp:datalist id="DataList4"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top