Hi Tevin,
Check this example. Now please take its reference and correct your code.
HTML
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Data</td>
<td><asp:TextBox ID="txtDate" runat="server" /></td>
</tr>
<tr>
<td>Next DueDate</td>
<td><asp:TextBox ID="txtNextDueDate" runat="server" /></td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:Button ID="btnReschedule" Text="Reschedule" runat="server" OnClick="btnReschedule_Click" />
</td>
</tr>
</table>
C#
protected void btnReschedule_Click(object sender, EventArgs e)
{
DateTime dueDate = Convert.ToDateTime(txtDate.Text);
DateTime nextDueDate = dueDate.AddDays(90);
if (nextDueDate.DayOfWeek == DayOfWeek.Sunday)
{
nextDueDate = dueDate.AddDays(91);
}
else if (nextDueDate.DayOfWeek == DayOfWeek.Saturday)
{
nextDueDate = dueDate.AddDays(92);
}
txtNextDueDate.Text = nextDueDate.ToString("dd/MM/yyyy");
}
VB.Net
Protected Sub btnReschedule_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim dueDate As DateTime = Convert.ToDateTime(txtDate.Text)
Dim nextDueDate As DateTime = dueDate.AddDays(90)
If nextDueDate.DayOfWeek = DayOfWeek.Sunday Then
nextDueDate = dueDate.AddDays(91)
ElseIf nextDueDate.DayOfWeek = DayOfWeek.Saturday Then
nextDueDate = dueDate.AddDays(92)
End If
txtNextDueDate.Text = nextDueDate.ToString("dd/MM/yyyy")
End Sub
Screenshot