I'm building an web application. I have a Sample.aspx file which I have asp controllers, asp grid view and etc. I want to add to this design but when I add it I can't get it to the code behind.
eg: String val = date.value;
When I do this in the code behind it gives an error saying "date does no exist in current context".
I tried deleting designer.aspx, adding "runat = server" but still couldn't find a proper solution. Can some one please help me with this?
Edit:
This is my html controller where I add to the asp form. I need to get the date from user.
<input type="date" id="date" runat="server" value=""/>
I use this on a jquery popup so if I use a asp:calendar, when a date is clicked jquery popup will be closed on the post back.
This is the asp back end code where I try to get the error saying....
Error 7 The name 'date' does not exist in the current context E:\IncidentManagement\WebUI\IncidentMain\IncidentMaster.aspx.cs 77 69 WebUI
incidentTXNMaster.IncidentDate = Convert.ToDateTime(date.value);
date? The error is indicating that it has no idea what the variabledateis.