Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. populating textBox without postback

populating textBox without postback

Scheduled Pinned Locked Moved ASP.NET
question
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    byka
    wrote on last edited by
    #1

    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

    J L M 3 Replies Last reply
    0
    • B byka

      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

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      You 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() {

      }

      1 Reply Last reply
      0
      • B byka

        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

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        yes you can do this n javascript/Jquery. without doing postback.

        1 Reply Last reply
        0
        • B byka

          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

          M Offline
          M Offline
          Mayank_Gupta_
          wrote on last edited by
          #4

          Try to achieve your functionality with JavaScript/Jquery

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups