Click here to Skip to main content
15,894,955 members
Home / Discussions / C#
   

C#

 
GeneralRe: Key Board Specifications (Key Codes) Pin
Dave Kreskowiak11-Oct-06 9:12
mveDave Kreskowiak11-Oct-06 9:12 
GeneralRe: Key Board Specifications (Key Codes) Pin
Dan Neely11-Oct-06 9:40
Dan Neely11-Oct-06 9:40 
GeneralRe: Key Board Specifications (Key Codes) Pin
Nader Elshehabi13-Oct-06 14:26
Nader Elshehabi13-Oct-06 14:26 
GeneralRe: Key Board Specifications (Key Codes) Pin
Syed Shahid Hussain13-Oct-06 20:47
Syed Shahid Hussain13-Oct-06 20:47 
GeneralRe: Key Board Specifications (Key Codes) Pin
Syed Shahid Hussain11-Oct-06 8:29
Syed Shahid Hussain11-Oct-06 8:29 
AnswerRe: Key Board Specifications (Key Codes) Pin
Amar Chaudhary11-Oct-06 15:17
Amar Chaudhary11-Oct-06 15:17 
Questiondatalist [modified] Pin
Ah_Mohsen_aly11-Oct-06 7:02
Ah_Mohsen_aly11-Oct-06 7:02 
AnswerRe: datalist Pin
Nader Elshehabi13-Oct-06 14:28
Nader Elshehabi13-Oct-06 14:28 
Hello

Here is a sample code quoted from MSDN:
<pre><%@ Page Language="C#" AutoEventWireup="True" %>
<%@ Import Namespace="System.Data" %>

<html>
<script runat="server">

ICollection CreateDataSource()
{

// Create sample data for the DataList control.
DataTable dt = new DataTable();
DataRow dr;

// Define the columns of the table.
dt.Columns.Add(new DataColumn("IntegerValue", typeof(Int32)));
dt.Columns.Add(new DataColumn("StringValue", typeof(String)));
dt.Columns.Add(new DataColumn("CurrencyValue", typeof(double)));
dt.Columns.Add(new DataColumn("ImageValue", typeof(String)));

// Populate the table with sample values.
for (int i = 0; i < 9; i++)
{
dr = dt.NewRow();

dr[0] = i;
dr[1] = "Description for item " + i.ToString();
dr[2] = 1.23 * (i + 1);
dr[3] = "Image" + i.ToString() + ".jpg";

dt.Rows.Add(dr);
}

DataView dv = new DataView(dt);
return dv;
}


void Page_Load(Object sender, EventArgs e)
{

// Load sample data only once, when the page is first loaded.
if (!IsPostBack)
{
ItemsList.DataSource = CreateDataSource();
ItemsList.DataBind();
}

}

</script>

<body>

<form runat=server>

<h3>DataList Example</h3>

<asp:DataList id="ItemsList"
BorderColor="black"
CellPadding="5"
CellSpacing="5"
RepeatDirection="Vertical"
RepeatLayout="Table"
RepeatColumns="3"
ShowBorder="True"
runat="server">

<HeaderStyle BackColor="#aaaadd">
</HeaderStyle>

<AlternatingItemStyle BackColor="Gainsboro">
</AlternatingItemStyle>

<HeaderTemplate>

List of items

</HeaderTemplate>

<ItemTemplate>

Description: <br>
<%# DataBinder.Eval(Container.DataItem, "StringValue") %>

<br>

Price: <%# DataBinder.Eval(Container.DataItem, "CurrencyValue", "{0:c}") %>

<br>

<asp:Image id="ProductImage"
ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ImageValue") %>'
runat="server"/>

</ItemTemplate>

</asp:DataList>

</form>

</body>
</html></pre>

For more details, you could write DataList in your MSDN index.



Regards
QuestionDICOM ... Pin
mostafa_h11-Oct-06 6:53
mostafa_h11-Oct-06 6:53 
Questioncsc usage Pin
waheed awan11-Oct-06 6:48
waheed awan11-Oct-06 6:48 
GeneralCrystal Report Problem Pin
Saleh Mahmoud11-Oct-06 6:31
Saleh Mahmoud11-Oct-06 6:31 
QuestionI want to use a SQL db local, in other computer Pin
giovannirodrigo11-Oct-06 6:06
giovannirodrigo11-Oct-06 6:06 
AnswerRe: I want to use a SQL db local, in other computer Pin
S. Senthil Kumar11-Oct-06 6:35
S. Senthil Kumar11-Oct-06 6:35 
GeneralRe: I want to use a SQL db local, in other computer Pin
giovannirodrigo16-Oct-06 2:31
giovannirodrigo16-Oct-06 2:31 
AnswerRe: I want to use a SQL db local, in other computer Pin
Dave Kreskowiak11-Oct-06 9:08
mveDave Kreskowiak11-Oct-06 9:08 
QuestionHow to syncrhonize a dialog edit ctrl with a web page edit ctrl Pin
kozu11-Oct-06 5:51
kozu11-Oct-06 5:51 
Questionitems in listbox Pin
fmardani11-Oct-06 5:35
fmardani11-Oct-06 5:35 
AnswerRe: items in listbox Pin
User 665811-Oct-06 6:27
User 665811-Oct-06 6:27 
AnswerRe: items in listbox Pin
Private_Void11-Oct-06 7:39
Private_Void11-Oct-06 7:39 
Questionchecking if value is one of a group Pin
impeham11-Oct-06 5:30
impeham11-Oct-06 5:30 
AnswerRe: checking if value is one of a group Pin
J4amieC11-Oct-06 5:52
J4amieC11-Oct-06 5:52 
AnswerRe: checking if value is one of a group Pin
Robert Rohde11-Oct-06 5:59
Robert Rohde11-Oct-06 5:59 
QuestionMy application stays alive in the process list after closing T-T Pin
AesopTurtle11-Oct-06 4:58
AesopTurtle11-Oct-06 4:58 
AnswerRe: My application stays alive in the process list after closing T-T Pin
mikone11-Oct-06 5:00
mikone11-Oct-06 5:00 
GeneralRe: My application stays alive in the process list after closing T-T Pin
AesopTurtle11-Oct-06 12:13
AesopTurtle11-Oct-06 12:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.