populating textBox without postback
-
I have dtEffectiveDate textbox and assigned postback event for _TextChanged. Is it possible to do the same logic without postback event?
Private Sub dtEffectiveDate_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtEffectiveDate.TextChanged
If IsDate(dtEffectiveDate.Text) Then
If Session("myInsPlanConfiguration").Installment = True Then
If chkIgnoreEventDates.Checked = False Then
If String.IsNullOrEmpty(dtEvent1.Text) = True Then
dtEvent1.Text = DateAdd(DateInterval.Day, -8, CDate(dtEffectiveDate.Text))
End If
End If
End If
End If
End Sub -
I have dtEffectiveDate textbox and assigned postback event for _TextChanged. Is it possible to do the same logic without postback event?
Private Sub dtEffectiveDate_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtEffectiveDate.TextChanged
If IsDate(dtEffectiveDate.Text) Then
If Session("myInsPlanConfiguration").Installment = True Then
If chkIgnoreEventDates.Checked = False Then
If String.IsNullOrEmpty(dtEvent1.Text) = True Then
dtEvent1.Text = DateAdd(DateInterval.Day, -8, CDate(dtEffectiveDate.Text))
End If
End If
End If
End If
End SubYou would have to use javascript, the onclick event Javascript can do everything but the session compare, you would have to store the session compare value in a hidden textbox, or generate the data using javascript. so you add
ad your javascript file
function myFunction() {
}
-
I have dtEffectiveDate textbox and assigned postback event for _TextChanged. Is it possible to do the same logic without postback event?
Private Sub dtEffectiveDate_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtEffectiveDate.TextChanged
If IsDate(dtEffectiveDate.Text) Then
If Session("myInsPlanConfiguration").Installment = True Then
If chkIgnoreEventDates.Checked = False Then
If String.IsNullOrEmpty(dtEvent1.Text) = True Then
dtEvent1.Text = DateAdd(DateInterval.Day, -8, CDate(dtEffectiveDate.Text))
End If
End If
End If
End If
End Sub -
I have dtEffectiveDate textbox and assigned postback event for _TextChanged. Is it possible to do the same logic without postback event?
Private Sub dtEffectiveDate_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtEffectiveDate.TextChanged
If IsDate(dtEffectiveDate.Text) Then
If Session("myInsPlanConfiguration").Installment = True Then
If chkIgnoreEventDates.Checked = False Then
If String.IsNullOrEmpty(dtEvent1.Text) = True Then
dtEvent1.Text = DateAdd(DateInterval.Day, -8, CDate(dtEffectiveDate.Text))
End If
End If
End If
End If
End SubTry to achieve your functionality with JavaScript/Jquery