Professional Web Applications Themes

datalist please help soon - ASP.NET Data Grid Control

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, ...

  1. #1

    Default datalist please help soon

    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 Guest

  2. #2

    Default Re: datalist please help soon

    Hi,

    Could you send me your sourse code please?

    Michael

    "mahsa" <anonymousdiscussions.microsoft.com> wrote in message
    news:9CA07856-86DA-4776-ABAB-4A62A248C83Cmicrosoft.com...
    > 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 Guest

Similar Threads

  1. DataList Problem
    By Gerald Klein in forum ASP.NET Building Controls
    Replies: 2
    Last Post: January 26th, 05:56 PM
  2. DataList: how to use??
    By Ed Warren in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: January 10th, 11:22 AM
  3. Attributes.Add() for DataList
    By Steve Klett in forum ASP.NET Data Grid Control
    Replies: 4
    Last Post: December 4th, 10:19 PM
  4. ASP:DATALIST
    By Chris Fink in forum ASP.NET General
    Replies: 1
    Last Post: July 27th, 07:36 AM
  5. ASP DataList
    By Chris Fink in forum ASP.NET General
    Replies: 1
    Last Post: July 18th, 03:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139