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. message box problem

message box problem

Scheduled Pinned Locked Moved ASP.NET
helptutorialquestion
9 Posts 5 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.
  • W Offline
    W Offline
    wongeva
    wrote on last edited by
    #1

    After i click a button to show message box ==> MessageBoc.Show("Error"); Bellow message displayed....... It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. How to solve this problem?

    M 1 Reply Last reply
    0
    • W wongeva

      After i click a button to show message box ==> MessageBoc.Show("Error"); Bellow message displayed....... It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application. How to solve this problem?

      M Offline
      M Offline
      multimedia9
      wrote on last edited by
      #2

      MessageBox.Show("Error"); this will not work in Asp.NET bcoz run time message box can be generated using only scripting languages. like Javascript. multimedia9

      W 1 Reply Last reply
      0
      • M multimedia9

        MessageBox.Show("Error"); this will not work in Asp.NET bcoz run time message box can be generated using only scripting languages. like Javascript. multimedia9

        W Offline
        W Offline
        wongeva
        wrote on last edited by
        #3

        hi, i use asp.net with c# to write the code.....it need to prompt a messagebox ...so, how to write the code to display it? thanks......

        R 1 Reply Last reply
        0
        • W wongeva

          hi, i use asp.net with c# to write the code.....it need to prompt a messagebox ...so, how to write the code to display it? thanks......

          R Offline
          R Offline
          Raghvendra Kumar Roy
          wrote on last edited by
          #4

          Hi You can use it with Javascript In Javascript there is an 'alert()' Function . you can use it thanks

          Raghvendra Kumar Roy

          W 1 Reply Last reply
          0
          • R Raghvendra Kumar Roy

            Hi You can use it with Javascript In Javascript there is an 'alert()' Function . you can use it thanks

            Raghvendra Kumar Roy

            W Offline
            W Offline
            wongeva
            wrote on last edited by
            #5

            Hi, Actually , i dun know about JAVA language.....Can mix with asp.net? U know how to solve it? Thanks, Eva

            K 1 Reply Last reply
            0
            • W wongeva

              Hi, Actually , i dun know about JAVA language.....Can mix with asp.net? U know how to solve it? Thanks, Eva

              K Offline
              K Offline
              koolprasad2003
              wrote on last edited by
              #6

              hi wongeva it's so simple to writing the Javascript in your asp.net application just follow the steps -- Open your html source view(behind the designer form) -- write down the code in after the -- function ClickMe() { Alert("The Messabox Appears"); return false; } -- and call this function on your "OnClick" event of button --Like <input type="submit" id="btnDemo" OnClick="return ClickMe();" runat="server"> Hope this will help U...Best luck -regards, koolprasad2003:) <div class="ForumSig">If the message is useful for U then please Rate This message... Be a good listener...Because Opprtunity knoughts softly...N-Joy</div></x-turndown>

              W 1 Reply Last reply
              0
              • K koolprasad2003

                hi wongeva it's so simple to writing the Javascript in your asp.net application just follow the steps -- Open your html source view(behind the designer form) -- write down the code in after the -- function ClickMe() { Alert("The Messabox Appears"); return false; } -- and call this function on your "OnClick" event of button --Like <input type="submit" id="btnDemo" OnClick="return ClickMe();" runat="server"> Hope this will help U...Best luck -regards, koolprasad2003:) <div class="ForumSig">If the message is useful for U then please Rate This message... Be a good listener...Because Opprtunity knoughts softly...N-Joy</div></x-turndown>

                W Offline
                W Offline
                wongeva
                wrote on last edited by
                #7

                <%@ Page language="c#" Codebehind="WebForm2.aspx.cs" AutoEventWireup="false" Inherits="try2.WebForm2" %> WebForm2 function ClickMe() { Alert("The MessageBox Appears"); return false; }

                G K 2 Replies Last reply
                0
                • W wongeva

                  <%@ Page language="c#" Codebehind="WebForm2.aspx.cs" AutoEventWireup="false" Inherits="try2.WebForm2" %> WebForm2 function ClickMe() { Alert("The MessageBox Appears"); return false; }

                  G Offline
                  G Offline
                  Guffa
                  wrote on last edited by
                  #8

                  Javascript is case sensetive. Change Alert to alert.

                  --- single minded; short sighted; long gone;

                  1 Reply Last reply
                  0
                  • W wongeva

                    <%@ Page language="c#" Codebehind="WebForm2.aspx.cs" AutoEventWireup="false" Inherits="try2.WebForm2" %> WebForm2 function ClickMe() { Alert("The MessageBox Appears"); return false; }

                    K Offline
                    K Offline
                    koolprasad2003
                    wrote on last edited by
                    #9

                    friend, Guffa is correct....change the "Alert" to "alert" this will definately help you... (By mistake i was write "Alert") regards, koolprasad2003:)

                    If the answer is useful for U then please Rate This message... Be a good listener...Because Opprtunity knoughts softly...N-Joy

                    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