Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im using a DataRepeater in VB.net, with data like Price, Date.... the problem is that i can't format these data in the form.... i want to show the Date like dd/MMM/yyyy and Money like $x,xxx.xx
Posted

You are going to have to format the values when you bind them in your repeater.
So something like this: (Assuming you have a MinPrice & SaleDate column in your dataset.)

ASP.NET
<asp:label id="Label1" runat="server" text='<%# String.Format("{0:C}", Eval("MinPrice")) %>'></asp:label>
<asp:label id="Label2" runat="server" text='<%# String.Format("{0:d}", Eval("SaleDate")) %>'></asp:label>
 
Share this answer
 
v2
this is the Solution

tFechaComp.Value = CDate(dataset.Tables(0).Rows(0).Item("FechaCompra").ToString)
tCST.Text = FormatCurrency(dataset.Tables(0).Rows(0).Item("CST").ToString, 2)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900