Within my webpage, there is an input field:
<input type="text" id="StartDate" />
In addition, there is a user control present on the same page:
<FCMS:ContactTypesChecklist ID="ContactTypesChecklist" runat="server" />
This is the code snippet for the user control:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ContactTypesChecklist.ascx.vb" Inherits="FCMS.ContactTypesChecklist" %>
<%@ Import Namespace="FCMSDBTools" %>
<%@ Import Namespace="System.Data" %>
<%
' TODO: put these in a nice table or something?
For Each dr As DataRow In DBFunctions.CurrentClientCareVisitationContactTypes.Rows
' TODO: filter contact types by start date specified
%>
<input type="checkbox" id="ContactTypes<% =dr("ClientCareVisitationContactTypeLUID") %>" name="ContactTypes" value="<% =dr("ClientCareVisitationContactTypeLUID") %>" />
<label for="ContactTypes<% =dr("ClientCareVisitationContactTypeLUID") %>"><% =dr("ScreenDescription")%></label>
<%
Next
%>
I am facing an issue where I require the user control to update whenever the text in the StartDate input field changes. The reason being, the available contact types in the system are date-sensitive and may vary based on certain dates (such as expiration dates). Although I have not implemented the filtering by date in the user control yet, how can I achieve the refresh when the date is modified? I believe AJAX might be involved, though I am unsure about its implementation and whether housing the markup inside a user control would simplify or complicate the process...
Any guidance would be greatly appreciated! 🙂