asked on
<input type="hidden" id="auctionEndDate" value="<%=TargetDate%>">
<script language="JavaScript">
TargetDate = "document.forms[0].TargetDate.value";
/*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="http://scripts.hashemian.com/js/countdown.js"></script>
</script>
public string TargetDate ()
{
String tDate = "";
DataTable dataTable = new DataTable();
using (SqlConnection connection = new SqlConnection("Server=localhost;Database=Timer;Trusted_Connection=True"))
using (SqlCommand command = connection.CreateCommand())
{
command.CommandText = "select * from endTime";
connection.Open();
SqlDataReader reader = command.ExecuteReader();
dataTable.Load(reader);
tDate = dataTable.Rows[0][0].ToString(); // Expecting the first row and first column
}
return tDate;
}
CS1502: The best overloaded method match for 'System.IO.TextWriter.Write(char)' has some invalid arguments
<input type="hidden" id="auctionEndDate" value="<%=TargetDate%>">