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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How I appear a custom dialog box ??

How I appear a custom dialog box ??

Scheduled Pinned Locked Moved ASP.NET
helptutorialquestionannouncement
4 Posts 2 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.
  • S Offline
    S Offline
    sofy2008
    wrote on last edited by
    #1

    Hi, I need to know how I do some thing.. I have FormView in my page and this form is in editMode and have a button ( save ) to save any information changed in FormView my problem is : I want to appear a message when the user want to go out without pressing on the save button For example : I have a FormView with edit mode , the user write some thing in this formview and don’t press the save button , then he want to return back to the main page by any button ( back or any other page link ),, here I want to appear this message .. " do you want to save this information " ?? With three choices " yes , no, cancel" When he press on 'yes' I want to call SqlDatSource.update() to update information And when he press on 'No' I call SqlDataSource.cancel()And when press on 'cancel ' I return to the same page without any event .. How I can do it ??

    S 1 Reply Last reply
    0
    • S sofy2008

      Hi, I need to know how I do some thing.. I have FormView in my page and this form is in editMode and have a button ( save ) to save any information changed in FormView my problem is : I want to appear a message when the user want to go out without pressing on the save button For example : I have a FormView with edit mode , the user write some thing in this formview and don’t press the save button , then he want to return back to the main page by any button ( back or any other page link ),, here I want to appear this message .. " do you want to save this information " ?? With three choices " yes , no, cancel" When he press on 'yes' I want to call SqlDatSource.update() to update information And when he press on 'No' I call SqlDataSource.cancel()And when press on 'cancel ' I return to the same page without any event .. How I can do it ??

      S Offline
      S Offline
      sepel
      wrote on last edited by
      #2

      hi you can use a showdialog and show custom form that have these buttons and then perform your program depend on the result of show dialog

      sepel

      S 1 Reply Last reply
      0
      • S sepel

        hi you can use a showdialog and show custom form that have these buttons and then perform your program depend on the result of show dialog

        sepel

        S Offline
        S Offline
        sofy2008
        wrote on last edited by
        #3

        Thanks for your reply .. But how I can found show dialog ?? or show custom form ? are these in java script ? Sorry for my question but because I am beginner in asp.net Thaanks

        S 1 Reply Last reply
        0
        • S sofy2008

          Thanks for your reply .. But how I can found show dialog ?? or show custom form ? are these in java script ? Sorry for my question but because I am beginner in asp.net Thaanks

          S Offline
          S Offline
          sepel
          wrote on last edited by
          #4

          you must add some javascript to onclient click of your buttons. then in them call showDialog of javascript you need some parameter to return value of dialog result. function ProductDialog(){ var mytext; var myvalue; } function myShowDialog() { ProductDialog.mytext=""; ProductDialog.myvalue=""; if(window.showModalDialog('../Choose.aspx' ,ProductDialog,"dialogHeight:570px;dialogWidth:440px;Scrollbar=1") == true ) { //do some thing } else { return; } } in your buttons add this onclientclick="if (myShowDialog()) return true; return false;" in form that you showed it write javascript to access dialog result window.dialogArguments.mytext = s; window.dialogArguments.myvalue = node.Value;

          sepel

          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