Reading from MessageBox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kewldudehere
    New Member
    • Jan 2007
    • 58

    Reading from MessageBox

    Hope You remember me. I just want to ask you quick Question. How to read from MessageBox. I need to implement something like this.
    There is a Manager who approves a record. If he want to reject, he can but need to supply some reason.
    So before rejecting a record, i want to display a message like ' Please enter valid reason for rejection' . Then i need to read the reason he enters and store it in the database.

    I am using asp.net2.0 and vb.net 2005.
    Can you tell me how to approach ?

    Thanks.
  • kewldudehere
    New Member
    • Jan 2007
    • 58

    #2
    Reading from MessageBox

    Hi Frinavale,

    Hope You remember me. I just want to ask you quick Question. How to read from MessageBox. I need to implement something like this.
    There is a Manager who approves a record. If he want to reject, he can but need to supply some reason.
    So before rejecting a record, i want to display a message like ' Please enter valid reason for rejection' . Then i need to read the reason he enters and store it in the database.

    I am using asp.net2.0 and vb.net 2005.
    Can you tell me how to approach ?

    Thanks.

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      Question moved to .NET forum.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        You will have to create your own dialog window for this. The MessageBox class only supports a reply of button pressing. If you want them to enter text, you will need to create your own dialog window.

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #5
          Please don't double post.

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            Originally posted by Plater
            Please don't double post.

            Oh my, this is my fault.
            I should have noticed that you had post your question already.
            I'm going to merge the two threads.
            In the future please don't double post your question.

            Thanks

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              Are you developing an ASP.NET application or a Desktop application?

              Comment

              • kewldudehere
                New Member
                • Jan 2007
                • 58

                #8
                Originally posted by Frinavale
                Are you developing an ASP.NET application or a Desktop application?
                I am developing an Asp.NET application.

                Comment

                • Frinavale
                  Recognized Expert Expert
                  • Oct 2006
                  • 9749

                  #9
                  Originally posted by kewldudehere
                  I am developing an Asp.NET application.
                  Ah! Ok how are you displaying a message box?
                  Are you using an JavaScript "alert()"?

                  Comment

                  • kewldudehere
                    New Member
                    • Jan 2007
                    • 58

                    #10
                    Originally posted by Frinavale
                    Ah! Ok how are you displaying a message box?
                    Are you using an JavaScript "alert()"?
                    I have to use a Javascript. But currently i am not displaying any alert boxes. I need to display something where user has to enter a valid reason and read that and store back into database.

                    Comment

                    • Frinavale
                      Recognized Expert Expert
                      • Oct 2006
                      • 9749

                      #11
                      Originally posted by kewldudehere
                      I have to use a Javascript. But currently i am not displaying any alert boxes. I need to display something where user has to enter a valid reason and read that and store back into database.
                      Well you have a lot of options here :)

                      You could just redirect them to a page and have them fill in an explanation there....

                      Or you could create a web user control that you can display when the user needs to enter an explanation.

                      Or you could write JavaScript that displays a prompt box and then gathers the explanation and then stores that value into a hidden field that can then be used by your program.

                      Do you need a a message box per-say or could you create your own user control to do this?

                      You can make the user control display in the middle of the page with CSS...and have it "float" on top of the rest of the content....I just think it'd be a lot easier to do this with a user control. Mixing languages is tricky and sometimes annoying...plus if they have turned off JavaScript then your prompting stuff won't work.

                      -Frinny

                      Comment

                      • mzmishra
                        Recognized Expert Contributor
                        • Aug 2007
                        • 390

                        #12
                        we have implemented this by creating a alert box and while clicking ok we are displaying another window having the controls where the user can input the reason text

                        Comment

                        • Frinavale
                          Recognized Expert Expert
                          • Oct 2006
                          • 9749

                          #13
                          Originally posted by mzmishra
                          we have implemented this by creating a alert box and while clicking ok we are displaying another window having the controls where the user can input the reason text

                          You don't even need to go so far as to place the control into another window...You can just "float it" on top of the current window if you really want....or just hide the contents of the current window and make the control visible :)

                          Depends on what you want to do really.

                          Comment

                          Working...