I currently got a calendar with edit buttons on each date, and once you press on them they send a "setReminder=ID" in the URL field. While the ID is correct, I have no idea how to actually "catch" the ID?
The situation is pretty much as following:
- The user clicks on the edit button on the respective date in the calendar
- The calendar sets "setReminder=ID-goes-here" in the URL field, as well as opens a form to set the event in
- The user inserts a event, hits submit, and the reminder appears in the calendar. On all dates, not just the one they selected, and this is where the problem is.
Currently I've got:
<%
var days = DateTime.DaysInMonth(2015, 11);
var month = 11;
var year = 2015;
List<string> dateTimes = new List<string>();
for (int x = 1; x < 8; x++)
{
string dateTime = new DateTime(year, month, x).ToString("dddd") ;
dateTime = dateTime.Replace(dateTime[0], dateTime[0].ToString().ToUpper()[0]);
Response.Write("<div class='days visible-lg-inline-block'> <ul> <li>");
Response.Write(dateTime);
Response.Write("</li> </ul> </div>");
dateTimes.Add(dateTime);
}
for (int i = 1; i < days; i++)
{
Response.Write("<div class='week'>");
Response.Write("<ul>");
Response.Write("<li>");
Response.Write(i);
%>
<a href='WebForm1.aspx?setReminder=<%= i %>'> <img src='editIcon.png' alt='Set reminder' /> </a>
<%
Response.Write("</li>");
Response.Write("</ul>");
Response.Write("</div>");
}
var setReminder = Request["setReminder"];
if(setReminder != null)
{
%>
<h3>Set a reminder/event</h3>
<form method="POST" action="WebForm1.aspx">
<input type="hidden" name="reminderId" value="25" />
Event name: <input type="text" name="reminderName" /> <br />
<button type="submit" name="submitReminder">Set</button> <br />
</form>
<%
}
%>