MsgBox appears where?

Uh....

I'm working in VS2005 on the local development server, and I've just written a server side (VB) msgbox to provide feedback to the user about an error...

and then I realized, I don't know how that's going to work.

Where do msgboxes in custom business objects appear?   Probably at the server?  Because they aren't writing any html to the client?   So, do I have to build a pop-up (or something) into the page dialog, to get the message back to the client?

Any clarification on this would be appreciated.

Thanks!
LVL 2
codequestAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

prajeebkumarCommented:
you should probably throw an exception in the custom business object when an error is encountered and your page or UI component can catch that exception and display the error in a pop up or somewhere appropriate in the page, such as a error panel, label or something..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
codequestAuthor Commented:
thanks for the inputs.  I'll take a day or so to check 'em out, and then wrap this up.
0
RejojohnyCommented:
trap the error in ur business object and then u have to use "Page.RegisterClientScriptBlock" to render a clientside (javasript) "alert"  ..

from MSDN
[Visual Basic, C#] The following example demonstrates the use of the RegisterClientScriptBlock method in conjunction with the IsClientScriptBlockRegistered method. If the ECMAScript written in the code-declaration block has not already been registered, as tested by IsClientScriptBlockRegistered, the RegisterClientScriptBlock call is made.
[Visual Basic]
<html>
  <head>
     <script language="VB" runat="server">
    Sub Page_Load( sender as Object,e as EventArgs)
         
       'Form the script that is to be registered at client side.
        Dim scriptString as String = "<script language=JavaScript> function DoClick() {"
        scriptString += "myForm.show.value='Welcome to Microsoft .NET'}<"
        scriptString += "/"
        scriptString += "script>"
     
            If(Not IsClientScriptBlockRegistered("clientScript"))
        RegisterClientScriptBlock("clientScript", scriptString)
        End If
     End Sub
     </script>
  </head>
  <body topmargin="20" leftmargin="10">
     <form id="myForm" runat="server">
        <input type="text" id="show" style="width=200">
      <input type="button" value="ClickMe" onclick="DoClick()">
     </form>
  </body>
</html>
[C#]
<html>
  <head>
    <script language="C#" runat="server">

     public void Page_Load(Object sender, EventArgs e) {

       // Form the script that is to be registered at client side.
       String scriptString = "<script language=JavaScript> function DoClick() {";
       scriptString += "myForm.show.value='Welcome to Microsoft .NET'}<";
       scriptString += "/";
       scriptString += "script>";

           if(!this.IsClientScriptBlockRegistered("clientScript"))
              this.RegisterClientScriptBlock("clientScript", scriptString);
     }

     </script>
  </head>
  <body topmargin="20" leftmargin="10">
     <form id="myForm" runat="server">
        <input type="text" id="show" style="width=200"> <input type="button" value="ClickMe" onclick="DoClick()">
     </form>
  </body>
</html>
0
codequestAuthor Commented:
I didn't do all the math, but these are good staring points...I'm going to wrap it up.
Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.