I have javascript timer countdown with the code:
<script language="JavaScript">
TargetDate = "<% = TargetDate %>";
/*this is a property in code behind*/BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "the auction end"
</script>
<script language="JavaScript" src="countdown.js"></script>
</script>
the code behind:
public string TargetDate ()
{
DataTable dataTable = new DataTable();
using (SqlConnection connection = new SqlConnection("Server=localhost;Database=Timer;Trusted_Connectopn=True"))
using (SqlCommand command = connection.CreateCommand())
{
command.CommandText = "select * from endTime";
connection.Open();
SqlDataReader reader = command.ExecuteReader();
dataTable.Load(reader); }
}
i get the error: 't.TargetDate()': not all code paths return value.
when i tried to write return i got another error... what means that i dont know what to do :)