Need help,want to insert record via a webform ,but 2 of are my column data type are DateTime
this is part of my code:
string Name = txtName.Text;
string Description = txtDecription.Text;
string Topic = txtTopic.Text;
string Sponsor = txtSponsor.Text;
string Location = txtLocation.Text;
DateTime StartDate;
StartDate= DateTime.Parse(txtStartDate.Text);
DateTime EndDate = DateTime.Parse(txtEndDate.Text);
string URL = txtURL.Text;
try
{
intResult = pBAL.Insert(Name,Description, Topic,Sponsor, Location,StartDate,EndDate, URL);
}
Error:Cannot Convert from System.'DateTime' to 'string'