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. user control on webform

user control on webform

Scheduled Pinned Locked Moved ASP.NET
javascriptsysadminquestionannouncement
5 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
    bhavna4321
    wrote on last edited by
    #1

    i have devexpress ASPxMenu control on my form and also other controls like textbox,button etc. If the user changes the text in the textbox and clicks the menu control i would like to prompt the user through javascript or server side coding that he has not saved his changes and moving on to other form. I tried with ajax update panel but that update panel use to get postback on textchanged event of textbox .So if I change textbox contents and press save button then it use to postback the form without the code for click of button getting executed. Can this be done through javascripting?

    N C N 3 Replies Last reply
    0
    • B bhavna4321

      i have devexpress ASPxMenu control on my form and also other controls like textbox,button etc. If the user changes the text in the textbox and clicks the menu control i would like to prompt the user through javascript or server side coding that he has not saved his changes and moving on to other form. I tried with ajax update panel but that update panel use to get postback on textchanged event of textbox .So if I change textbox contents and press save button then it use to postback the form without the code for click of button getting executed. Can this be done through javascripting?

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      bhavna4321 wrote:

      Can this be done through javascripting?

      Yes. You need to keep a flag which sets when value changes in the text box. Hook a JS function on the OnUnload event and check this flag's status. If it is set, display the prompt.

      Best wishes, Navaneeth

      B 1 Reply Last reply
      0
      • N N a v a n e e t h

        bhavna4321 wrote:

        Can this be done through javascripting?

        Yes. You need to keep a flag which sets when value changes in the text box. Hook a JS function on the OnUnload event and check this flag's status. If it is set, display the prompt.

        Best wishes, Navaneeth

        B Offline
        B Offline
        bhavna4321
        wrote on last edited by
        #3

        how ???

        1 Reply Last reply
        0
        • B bhavna4321

          i have devexpress ASPxMenu control on my form and also other controls like textbox,button etc. If the user changes the text in the textbox and clicks the menu control i would like to prompt the user through javascript or server side coding that he has not saved his changes and moving on to other form. I tried with ajax update panel but that update panel use to get postback on textchanged event of textbox .So if I change textbox contents and press save button then it use to postback the form without the code for click of button getting executed. Can this be done through javascripting?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          bhavna4321 wrote:

          Can this be done through javascripting?

          The answer, as you've been told, is yes. It's really easy. Perhaps you should buy a javascript book and read it ? There's an event that fires if your textbox text changes, when that fires, you set your flag and you check it in the event, as you were told.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          1 Reply Last reply
          0
          • B bhavna4321

            i have devexpress ASPxMenu control on my form and also other controls like textbox,button etc. If the user changes the text in the textbox and clicks the menu control i would like to prompt the user through javascript or server side coding that he has not saved his changes and moving on to other form. I tried with ajax update panel but that update panel use to get postback on textchanged event of textbox .So if I change textbox contents and press save button then it use to postback the form without the code for click of button getting executed. Can this be done through javascripting?

            N Offline
            N Offline
            Nishant Singh
            wrote on last edited by
            #5

            Do you only need to prompt a meassage or it should disallow user to navigate to another page ???

            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