我的 as页一有:
<tr>
<td class="lbl">Geboortedatum</td>
<td class="lbl">:</td>
<td class="data">
<asp:Label ID="tbBirthDate" CssClass="details" runat="server" />
</td>
</tr>
1. 本附件从卷宗中填满:
var cust = (from c in db.tbCustomers
join s in db.tbStreets on new { c.StreetId, c.PostCode } equals new { s.StreetId, s.PostCode }
join p in db.tbPostalAreas on s.PostCode equals p.PostCode
where c.Id == customerId
select new
{
FirstNames = c.FirstNames,
MiddleName = c.MiddleName,
LastName = c.LastName,
BirthDate = string.Format("{0:dd-mm-yyyy}", c.BirthDate.Value.ToShortDateString()),
StreetName = s.Street,
HouseNumber = c.HouseNumber,
PostCode = c.PostCode,
PostCodeLetters = c.StreetId,
City = p.City,
Email = c.Email,
Mobile = c.PhoneMobile,
PickUpAddress = c.PickupAddress
}).SingleOrDefault();
if (cust != null)
{
tbFirstName.Text = cust.FirstNames;
tbLastName.Text = (cust.MiddleName != null) ? cust.MiddleName + " " + cust.LastName : cust.LastName;
tbBirthDate.Text = cust.BirthDate;
tbStreetName.Text = cust.StreetName + " " + cust.HouseNumber;
tbPostCode.Text = cust.PostCode + " " + cust.PostCodeLetters;
tbCity.Text = cust.City;
tbEmail.Text = cust.Email;
tbMobile.Text = cust.Mobile;
tbPickupAddress.Text = cust.PickUpAddress;
}
Now when running locally i get a date like 26-10-2011, but when placed on my server i get 10/26/2011 How can i force the date to be shown as 26-10-2011 ?