datalist please help soon

Discussion in 'ASP .Net Datagrid Control' started by mahsa, Apr 30, 2004.

  1. mahsa

    mahsa Guest

    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
    mahsa, Apr 30, 2004
    #1
    1. Advertising

  2. Hi,

    Could you send me your sourse code please?

    Michael

    "mahsa" <> wrote in message
    news:...
    > 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"><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>
    > 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}")

    %>)</a></td></tr></table></td></tr><tr><td><table width="75%"
    border="0"><tr><td>Warranty Protection
    > </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"
    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></TA
    BLE></form></body></HTML>
    >
    > how can i show for example row(5) first in datalist?
    >
    Michael Tkachev, Apr 30, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?bWFoc2E=?=

    please help me soon!

    =?Utf-8?B?bWFoc2E=?=, Feb 13, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    524
    Actonelium
    Jan 25, 2012
  2. Nevyn Twyll
    Replies:
    8
    Views:
    1,868
  3. KK
    Replies:
    2
    Views:
    552
    Big Brian
    Oct 14, 2003
  4. Replies:
    6
    Views:
    367
    Gabriel Genellina
    Jan 14, 2007
  5. David A. Black
    Replies:
    1
    Views:
    86
    Josh Charles
    Aug 30, 2005
Loading...

Share This Page