Msgbox to asp client?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Betina Andersen

    #1

    Msgbox to asp client?

    I have inherited a VB.NET dll that I am using from common asp.

    My problem is to get the messages from the dll to the Ie client, I can see the messages in the Eventlog on the IIS server so I know they are there, but how do I get them to show in IE?

    The original code was:
    MsgBox("Kunne ikke finde databasenavn udfra den angivne DSN: " & DSN)
    I tried to change that to:

    Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den angivne DSN: " & DSN, "Fejl", MessageBoxButto ns.OK, MessageBoxIcon. Error, MessageBoxDefau ltButton.Button 1, MessageBoxOptio ns.DefaultDeskt opOnly, False)

    But they still dont show up on the client, so how do I do that?



    Thanks

    Betina

  • Patrice

    #2
    Re: Msgbox to asp client?

    Keep in mind that the DLL runs server side so the message box is "shown"
    server side (actually written in the log as it runs in a non interactive
    context).

    To show a message client side you have to send it to the browser in the
    response (either as plain HTML or as a client side script that display this
    in a message box).
    The DLL could raise an exception to signal it has a problem.

    In this particular case (looks like a technical error message), my personal
    preference is rather to display a generic message to the user and to warn
    the support team (after all the user won't be able to do anything else than
    calling the support team if the DSN is not defined).

    --
    Patrice

    "Betina Andersen" <byl@invalid.co ma écrit dans le message de news:
    OLfpkQKrGHA.451 2@TK2MSFTNGP04. phx.gbl...
    I have inherited a VB.NET dll that I am using from common asp.

    My problem is to get the messages from the dll to the Ie client, I can see
    the messages in the Eventlog on the IIS server so I know they are there, but
    how do I get them to show in IE?

    The original code was:
    MsgBox("Kunne ikke finde databasenavn udfra den angivne DSN: " & DSN)
    I tried to change that to:

    Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den angivne
    DSN: " & DSN, "Fejl", MessageBoxButto ns.OK, MessageBoxIcon. Error,
    MessageBoxDefau ltButton.Button 1, MessageBoxOptio ns.DefaultDeskt opOnly,
    False)

    But they still dont show up on the client, so how do I do that?



    Thanks

    Betina


    Comment

    • tommaso.gastaldi@uniroma1.it

      #3
      Re: Msgbox to asp client? - Separate kernel code from interfaces

      In order to use the same code for winforms and webforms one must not
      use directly controls (labels, progressbars, textboxes) or msgboxes.

      You can define an abract messenger which issue messages (ex: statusmsg,
      errormsg, logmsg, etc ).
      Depending on the context (winforms/webforms) you will bind the events
      (or delegates) of the messenger to controls (winforms) or
      to some kind of web output (response, labels on web forms, etc.) ...

      I find very convenient this kind of mechanism, as it allows to use the
      same code for winforms or webforms.
      It separates clearly the program logic from the GUIs.

      -tom

      Betina Andersen ha scritto:
      I have inherited a VB.NET dll that I am using from common asp.
      >
      My problem is to get the messages from the dll to the Ie client, I can see the messages in the Eventlog on the IIS server so I know they are there, but how do I get them to show in IE?
      >
      The original code was:
      MsgBox("Kunne ikke finde databasenavn udfra den angivne DSN: " & DSN)
      I tried to change that to:
      >
      Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den angivne DSN: " & DSN, "Fejl", MessageBoxButto ns.OK, MessageBoxIcon. Error, MessageBoxDefau ltButton.Button 1, MessageBoxOptio ns.DefaultDeskt opOnly, False)
      >
      But they still dont show up on the client, so how do I do that?
      >
      >
      >
      Thanks
      >
      Betina
      >
      ------=_NextPart_000_ 0006_01C6ACB4.C DF36910
      Content-Type: text/html; charset=iso-8859-1
      Content-Transfer-Encoding: quoted-printable
      X-Google-AttachSize: 1521
      >
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML><HEAD>
      <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
      <META content="MSHTML 6.00.2900.2912" name=GENERATOR>
      <STYLE></STYLE>
      </HEAD>
      <BODY>
      <DIV><FONT face=Arial size=2>I have inherited a VB.NET dll that I am using from
      common asp.</FONT></DIV>
      <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2>My problem is to get the messages from the dll to
      the Ie client, I can see the messages in the Eventlog on the IIS server so I
      know they are there, but how do I get them to show in IE?</FONT></DIV>
      <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2>The original code was:</FONT></DIV>
      <DIV><FONT face=Arial size=2>MsgBox(" Kunne ikke finde databasenavn udfra den
      angivne DSN: " &amp; DSN)</FONT></DIV>
      <P><FONT face=Arial size=2>I tried to change that to:</FONT></P>
      <P><FONT face=Arial size=2>Result = MessageBox.Show ("Kunne ikke finde
      databasenavn udfra den angivne DSN: " &amp; DSN, "Fejl", MessageBoxButto ns.OK,
      MessageBoxIcon. Error, MessageBoxDefau ltButton.Button 1,
      MessageBoxOptio ns.DefaultDeskt opOnly, False)</FONT></P>
      <P><FONT face=Arial size=2>But they still dont show up on the client, so how do
      I do that?</FONT></P>
      <P><FONT face=Arial size=2></FONT>&nbsp;</P>
      <P><FONT face=Arial size=2>Thanks </FONT></P>
      <P><FONT face=Arial size=2>Betina</FONT></P></BODY></HTML>
      >
      ------=_NextPart_000_ 0006_01C6ACB4.C DF36910--

      Comment

      • Betina Andersen

        #4
        Re: Msgbox to asp client?

        So will I have to send the Response Object to my DLL and return it on error,
        is that what you are saying?

        Regards Betina

        "Patrice" <scribe@chez.co mskrev i en meddelelse
        news:%23U%23tSd KrGHA.4632@TK2M SFTNGP05.phx.gb l...
        Keep in mind that the DLL runs server side so the message box is "shown"
        server side (actually written in the log as it runs in a non interactive
        context).
        >
        To show a message client side you have to send it to the browser in the
        response (either as plain HTML or as a client side script that display
        this in a message box).
        The DLL could raise an exception to signal it has a problem.
        >
        In this particular case (looks like a technical error message), my
        personal preference is rather to display a generic message to the user and
        to warn the support team (after all the user won't be able to do anything
        else than calling the support team if the DSN is not defined).
        >
        --
        Patrice
        >
        "Betina Andersen" <byl@invalid.co ma écrit dans le message de news:
        OLfpkQKrGHA.451 2@TK2MSFTNGP04. phx.gbl...
        I have inherited a VB.NET dll that I am using from common asp.
        >
        My problem is to get the messages from the dll to the Ie client, I can see
        the messages in the Eventlog on the IIS server so I know they are there,
        but how do I get them to show in IE?
        >
        The original code was:
        MsgBox("Kunne ikke finde databasenavn udfra den angivne DSN: " & DSN)
        I tried to change that to:
        >
        Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den angivne
        DSN: " & DSN, "Fejl", MessageBoxButto ns.OK, MessageBoxIcon. Error,
        MessageBoxDefau ltButton.Button 1, MessageBoxOptio ns.DefaultDeskt opOnly,
        False)
        >
        But they still dont show up on the client, so how do I do that?
        >
        >
        >
        Thanks
        >
        Betina
        >
        >

        Comment

        • Betina Andersen

          #5
          Re: Msgbox to asp client? - Separate kernel code from interfaces

          I do not use controls in my DLL, the idea with a messenger sounds
          interestering, but my problem is that I am not very good in .NET, so can you
          supply an example?

          Regards Betina

          <tommaso.gastal di@uniroma1.its krev i en meddelelse
          news:1153488612 .673452.181410@ i3g2000cwc.goog legroups.com...
          In order to use the same code for winforms and webforms one must not
          use directly controls (labels, progressbars, textboxes) or msgboxes.
          >
          You can define an abract messenger which issue messages (ex: statusmsg,
          errormsg, logmsg, etc ).
          Depending on the context (winforms/webforms) you will bind the events
          (or delegates) of the messenger to controls (winforms) or
          to some kind of web output (response, labels on web forms, etc.) ...
          >
          I find very convenient this kind of mechanism, as it allows to use the
          same code for winforms or webforms.
          It separates clearly the program logic from the GUIs.
          >
          -tom
          >
          Betina Andersen ha scritto:
          >
          >I have inherited a VB.NET dll that I am using from common asp.
          >>
          >My problem is to get the messages from the dll to the Ie client, I can
          >see the messages in the Eventlog on the IIS server so I know they are
          >there, but how do I get them to show in IE?
          >>
          >The original code was:
          >MsgBox("Kunn e ikke finde databasenavn udfra den angivne DSN: " & DSN)
          >I tried to change that to:
          >>
          >Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den angivne
          >DSN: " & DSN, "Fejl", MessageBoxButto ns.OK, MessageBoxIcon. Error,
          >MessageBoxDefa ultButton.Butto n1, MessageBoxOptio ns.DefaultDeskt opOnly,
          >False)
          >>
          >But they still dont show up on the client, so how do I do that?
          >>
          >>
          >>
          >Thanks
          >>
          >Betina
          >>
          >------=_NextPart_000_ 0006_01C6ACB4.C DF36910
          >Content-Type: text/html; charset=iso-8859-1
          >Content-Transfer-Encoding: quoted-printable
          >X-Google-AttachSize: 1521
          >>
          ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
          ><HTML><HEAD>
          ><META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
          ><META content="MSHTML 6.00.2900.2912" name=GENERATOR>
          ><STYLE></STYLE>
          ></HEAD>
          ><BODY>
          ><DIV><FONT face=Arial size=2>I have inherited a VB.NET dll that I am
          >using from
          >common asp.</FONT></DIV>
          ><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
          ><DIV><FONT face=Arial size=2>My problem is to get the messages from the
          >dll to
          >the Ie client, I can see the messages in the Eventlog on the IIS server
          >so I
          >know they are there, but how do I get them to show in IE?</FONT></DIV>
          ><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
          ><DIV><FONT face=Arial size=2>The original code was:</FONT></DIV>
          ><DIV><FONT face=Arial size=2>MsgBox(" Kunne ikke finde databasenavn udfra
          >den
          >angivne DSN: " &amp; DSN)</FONT></DIV>
          ><P><FONT face=Arial size=2>I tried to change that to:</FONT></P>
          ><P><FONT face=Arial size=2>Result = MessageBox.Show ("Kunne ikke finde
          >databasenavn udfra den angivne DSN: " &amp; DSN, "Fejl",
          >MessageBoxButt ons.OK,
          >MessageBoxIcon .Error, MessageBoxDefau ltButton.Button 1,
          >MessageBoxOpti ons.DefaultDesk topOnly, False)</FONT></P>
          ><P><FONT face=Arial size=2>But they still dont show up on the client, so
          >how do
          >I do that?</FONT></P>
          ><P><FONT face=Arial size=2></FONT>&nbsp;</P>
          ><P><FONT face=Arial size=2>Thanks </FONT></P>
          ><P><FONT face=Arial size=2>Betina</FONT></P></BODY></HTML>
          >>
          >------=_NextPart_000_ 0006_01C6ACB4.C DF36910--
          >

          Comment

          • Betina Andersen

            #6
            Re: Msgbox to asp client?

            I did send Response to my sub - then I used

            Response.Write "Some message"
            Response.Flush

            But I cannot seem to get anything through to my client (IE) - what do I do
            wrong?

            Regard Betina

            "Betina Andersen" <byl@invalid.co mskrev i en meddelelse
            news:eQU7WjurGH A.2124@TK2MSFTN GP05.phx.gbl...
            So will I have to send the Response Object to my DLL and return it on
            error, is that what you are saying?
            >
            Regards Betina
            >
            "Patrice" <scribe@chez.co mskrev i en meddelelse
            news:%23U%23tSd KrGHA.4632@TK2M SFTNGP05.phx.gb l...
            >Keep in mind that the DLL runs server side so the message box is "shown"
            >server side (actually written in the log as it runs in a non interactive
            >context).
            >>
            >To show a message client side you have to send it to the browser in the
            >response (either as plain HTML or as a client side script that display
            >this in a message box).
            >The DLL could raise an exception to signal it has a problem.
            >>
            >In this particular case (looks like a technical error message), my
            >personal preference is rather to display a generic message to the user
            >and to warn the support team (after all the user won't be able to do
            >anything else than calling the support team if the DSN is not defined).
            >>
            >--
            >Patrice
            >>
            >"Betina Andersen" <byl@invalid.co ma écrit dans le message de news:
            >OLfpkQKrGHA.451 2@TK2MSFTNGP04. phx.gbl...
            >I have inherited a VB.NET dll that I am using from common asp.
            >>
            >My problem is to get the messages from the dll to the Ie client, I can
            >see the messages in the Eventlog on the IIS server so I know they are
            >there, but how do I get them to show in IE?
            >>
            >The original code was:
            >MsgBox("Kunn e ikke finde databasenavn udfra den angivne DSN: " & DSN)
            >I tried to change that to:
            >>
            >Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den angivne
            >DSN: " & DSN, "Fejl", MessageBoxButto ns.OK, MessageBoxIcon. Error,
            >MessageBoxDefa ultButton.Butto n1, MessageBoxOptio ns.DefaultDeskt opOnly,
            >False)
            >>
            >But they still dont show up on the client, so how do I do that?
            >>
            >>
            >>
            >Thanks
            >>
            >Betina
            >>
            >>
            >
            >

            Comment

            • Cor Ligthert [MVP]

              #7
              Re: Msgbox to asp client?

              Betina,

              The most easiest way for this is to create some labels on a panel that you
              hide when don't need it.

              One of the labels is your messagetext.

              Cor

              "Betina Andersen" <byl@invalid.co mschreef in bericht
              news:O9nMO$vrGH A.4852@TK2MSFTN GP05.phx.gbl...
              >I did send Response to my sub - then I used
              >
              Response.Write "Some message"
              Response.Flush
              >
              But I cannot seem to get anything through to my client (IE) - what do I do
              wrong?
              >
              Regard Betina
              >
              "Betina Andersen" <byl@invalid.co mskrev i en meddelelse
              news:eQU7WjurGH A.2124@TK2MSFTN GP05.phx.gbl...
              >So will I have to send the Response Object to my DLL and return it on
              >error, is that what you are saying?
              >>
              >Regards Betina
              >>
              >"Patrice" <scribe@chez.co mskrev i en meddelelse
              >news:%23U%23tS dKrGHA.4632@TK2 MSFTNGP05.phx.g bl...
              >>Keep in mind that the DLL runs server side so the message box is "shown"
              >>server side (actually written in the log as it runs in a non interactive
              >>context).
              >>>
              >>To show a message client side you have to send it to the browser in the
              >>response (either as plain HTML or as a client side script that display
              >>this in a message box).
              >>The DLL could raise an exception to signal it has a problem.
              >>>
              >>In this particular case (looks like a technical error message), my
              >>personal preference is rather to display a generic message to the user
              >>and to warn the support team (after all the user won't be able to do
              >>anything else than calling the support team if the DSN is not defined).
              >>>
              >>--
              >>Patrice
              >>>
              >>"Betina Andersen" <byl@invalid.co ma écrit dans le message de news:
              >>OLfpkQKrGHA.451 2@TK2MSFTNGP04. phx.gbl...
              >>I have inherited a VB.NET dll that I am using from common asp.
              >>>
              >>My problem is to get the messages from the dll to the Ie client, I can
              >>see the messages in the Eventlog on the IIS server so I know they are
              >>there, but how do I get them to show in IE?
              >>>
              >>The original code was:
              >>MsgBox("Kun ne ikke finde databasenavn udfra den angivne DSN: " & DSN)
              >>I tried to change that to:
              >>>
              >>Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den
              >>angivne DSN: " & DSN, "Fejl", MessageBoxButto ns.OK,
              >>MessageBoxIco n.Error, MessageBoxDefau ltButton.Button 1,
              >>MessageBoxOpt ions.DefaultDes ktopOnly, False)
              >>>
              >>But they still dont show up on the client, so how do I do that?
              >>>
              >>>
              >>>
              >>Thanks
              >>>
              >>Betina
              >>>
              >>>
              >>
              >>
              >
              >

              Comment

              • Betina Andersen

                #8
                Re: Msgbox to asp client?

                But how can I add a panel when I do not have a userinterface in the .NET
                dll?

                Regards Betina

                "Cor Ligthert [MVP]" <notmyfirstname @planet.nlskrev i en meddelelse
                news:OlkcJYwrGH A.1604@TK2MSFTN GP05.phx.gbl...
                Betina,
                >
                The most easiest way for this is to create some labels on a panel that you
                hide when don't need it.
                >
                One of the labels is your messagetext.
                >
                Cor
                >
                "Betina Andersen" <byl@invalid.co mschreef in bericht
                news:O9nMO$vrGH A.4852@TK2MSFTN GP05.phx.gbl...
                >>I did send Response to my sub - then I used
                >>
                >Response.Wri te "Some message"
                >Response.Flu sh
                >>
                >But I cannot seem to get anything through to my client (IE) - what do I
                >do wrong?
                >>
                >Regard Betina
                >>
                >"Betina Andersen" <byl@invalid.co mskrev i en meddelelse
                >news:eQU7WjurG HA.2124@TK2MSFT NGP05.phx.gbl.. .
                >>So will I have to send the Response Object to my DLL and return it on
                >>error, is that what you are saying?
                >>>
                >>Regards Betina
                >>>
                >>"Patrice" <scribe@chez.co mskrev i en meddelelse
                >>news:%23U%23t SdKrGHA.4632@TK 2MSFTNGP05.phx. gbl...
                >>>Keep in mind that the DLL runs server side so the message box is
                >>>"shown" server side (actually written in the log as it runs in a non
                >>>interactiv e context).
                >>>>
                >>>To show a message client side you have to send it to the browser in the
                >>>response (either as plain HTML or as a client side script that display
                >>>this in a message box).
                >>>The DLL could raise an exception to signal it has a problem.
                >>>>
                >>>In this particular case (looks like a technical error message), my
                >>>personal preference is rather to display a generic message to the user
                >>>and to warn the support team (after all the user won't be able to do
                >>>anything else than calling the support team if the DSN is not defined).
                >>>>
                >>>--
                >>>Patrice
                >>>>
                >>>"Betina Andersen" <byl@invalid.co ma écrit dans le message de news:
                >>>OLfpkQKrGHA.451 2@TK2MSFTNGP04. phx.gbl...
                >>>I have inherited a VB.NET dll that I am using from common asp.
                >>>>
                >>>My problem is to get the messages from the dll to the Ie client, I can
                >>>see the messages in the Eventlog on the IIS server so I know they are
                >>>there, but how do I get them to show in IE?
                >>>>
                >>>The original code was:
                >>>MsgBox("Kunn e ikke finde databasenavn udfra den angivne DSN: " & DSN)
                >>>I tried to change that to:
                >>>>
                >>>Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den
                >>>angivne DSN: " & DSN, "Fejl", MessageBoxButto ns.OK,
                >>>MessageBoxIc on.Error, MessageBoxDefau ltButton.Button 1,
                >>>MessageBoxOp tions.DefaultDe sktopOnly, False)
                >>>>
                >>>But they still dont show up on the client, so how do I do that?
                >>>>
                >>>>
                >>>>
                >>>Thanks
                >>>>
                >>>Betina
                >>>>
                >>>>
                >>>
                >>>
                >>
                >>
                >
                >

                Comment

                • Cor Ligthert [MVP]

                  #9
                  Re: Msgbox to asp client?

                  What is that Net.dll

                  The system.net?

                  Cor

                  "Betina Andersen" <byl@invalid.co mschreef in bericht
                  news:%23z9qpHxr GHA.1140@TK2MSF TNGP05.phx.gbl. ..
                  But how can I add a panel when I do not have a userinterface in the .NET
                  dll?
                  >
                  Regards Betina
                  >
                  "Cor Ligthert [MVP]" <notmyfirstname @planet.nlskrev i en meddelelse
                  news:OlkcJYwrGH A.1604@TK2MSFTN GP05.phx.gbl...
                  >Betina,
                  >>
                  >The most easiest way for this is to create some labels on a panel that
                  >you hide when don't need it.
                  >>
                  >One of the labels is your messagetext.
                  >>
                  >Cor
                  >>
                  >"Betina Andersen" <byl@invalid.co mschreef in bericht
                  >news:O9nMO$vrG HA.4852@TK2MSFT NGP05.phx.gbl.. .
                  >>>I did send Response to my sub - then I used
                  >>>
                  >>Response.Writ e "Some message"
                  >>Response.Flus h
                  >>>
                  >>But I cannot seem to get anything through to my client (IE) - what do I
                  >>do wrong?
                  >>>
                  >>Regard Betina
                  >>>
                  >>"Betina Andersen" <byl@invalid.co mskrev i en meddelelse
                  >>news:eQU7Wjur GHA.2124@TK2MSF TNGP05.phx.gbl. ..
                  >>>So will I have to send the Response Object to my DLL and return it on
                  >>>error, is that what you are saying?
                  >>>>
                  >>>Regards Betina
                  >>>>
                  >>>"Patrice" <scribe@chez.co mskrev i en meddelelse
                  >>>news:%23U%23 tSdKrGHA.4632@T K2MSFTNGP05.phx .gbl...
                  >>>>Keep in mind that the DLL runs server side so the message box is
                  >>>>"shown" server side (actually written in the log as it runs in a non
                  >>>>interacti ve context).
                  >>>>>
                  >>>>To show a message client side you have to send it to the browser in
                  >>>>the response (either as plain HTML or as a client side script that
                  >>>>display this in a message box).
                  >>>>The DLL could raise an exception to signal it has a problem.
                  >>>>>
                  >>>>In this particular case (looks like a technical error message), my
                  >>>>personal preference is rather to display a generic message to the user
                  >>>>and to warn the support team (after all the user won't be able to do
                  >>>>anything else than calling the support team if the DSN is not
                  >>>>defined).
                  >>>>>
                  >>>>--
                  >>>>Patrice
                  >>>>>
                  >>>>"Betina Andersen" <byl@invalid.co ma écrit dans le message de news:
                  >>>>OLfpkQKrGHA.451 2@TK2MSFTNGP04. phx.gbl...
                  >>>>I have inherited a VB.NET dll that I am using from common asp.
                  >>>>>
                  >>>>My problem is to get the messages from the dll to the Ie client, I can
                  >>>>see the messages in the Eventlog on the IIS server so I know they are
                  >>>>there, but how do I get them to show in IE?
                  >>>>>
                  >>>>The original code was:
                  >>>>MsgBox("Kun ne ikke finde databasenavn udfra den angivne DSN: " & DSN)
                  >>>>I tried to change that to:
                  >>>>>
                  >>>>Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den
                  >>>>angivne DSN: " & DSN, "Fejl", MessageBoxButto ns.OK,
                  >>>>MessageBoxI con.Error, MessageBoxDefau ltButton.Button 1,
                  >>>>MessageBoxO ptions.DefaultD esktopOnly, False)
                  >>>>>
                  >>>>But they still dont show up on the client, so how do I do that?
                  >>>>>
                  >>>>>
                  >>>>>
                  >>>>Thanks
                  >>>>>
                  >>>>Betina
                  >>>>>
                  >>>>>
                  >>>>
                  >>>>
                  >>>
                  >>>
                  >>
                  >>
                  >
                  >

                  Comment

                  • Betina Andersen

                    #10
                    Re: Msgbox to asp client?

                    I have a DLL written in VB:NET that DLL am I using from pure asp, the VB:NET
                    DLL consists of a lot og subs and functions which I call from my asp page.

                    Regards Betina

                    "Cor Ligthert [MVP]" <notmyfirstname @planet.nlskrev i en meddelelse
                    news:uKV7JNxrGH A.4272@TK2MSFTN GP03.phx.gbl...
                    What is that Net.dll
                    >
                    The system.net?
                    >
                    Cor
                    >
                    "Betina Andersen" <byl@invalid.co mschreef in bericht
                    news:%23z9qpHxr GHA.1140@TK2MSF TNGP05.phx.gbl. ..
                    >But how can I add a panel when I do not have a userinterface in the .NET
                    >dll?
                    >>
                    >Regards Betina
                    >>
                    >"Cor Ligthert [MVP]" <notmyfirstname @planet.nlskrev i en meddelelse
                    >news:OlkcJYwrG HA.1604@TK2MSFT NGP05.phx.gbl.. .
                    >>Betina,
                    >>>
                    >>The most easiest way for this is to create some labels on a panel that
                    >>you hide when don't need it.
                    >>>
                    >>One of the labels is your messagetext.
                    >>>
                    >>Cor
                    >>>
                    >>"Betina Andersen" <byl@invalid.co mschreef in bericht
                    >>news:O9nMO$vr GHA.4852@TK2MSF TNGP05.phx.gbl. ..
                    >>>>I did send Response to my sub - then I used
                    >>>>
                    >>>Response.Wri te "Some message"
                    >>>Response.Flu sh
                    >>>>
                    >>>But I cannot seem to get anything through to my client (IE) - what do I
                    >>>do wrong?
                    >>>>
                    >>>Regard Betina
                    >>>>
                    >>>"Betina Andersen" <byl@invalid.co mskrev i en meddelelse
                    >>>news:eQU7Wju rGHA.2124@TK2MS FTNGP05.phx.gbl ...
                    >>>>So will I have to send the Response Object to my DLL and return it on
                    >>>>error, is that what you are saying?
                    >>>>>
                    >>>>Regards Betina
                    >>>>>
                    >>>>"Patrice" <scribe@chez.co mskrev i en meddelelse
                    >>>>news:%23U%2 3tSdKrGHA.4632@ TK2MSFTNGP05.ph x.gbl...
                    >>>>>Keep in mind that the DLL runs server side so the message box is
                    >>>>>"shown" server side (actually written in the log as it runs in a non
                    >>>>>interactiv e context).
                    >>>>>>
                    >>>>>To show a message client side you have to send it to the browser in
                    >>>>>the response (either as plain HTML or as a client side script that
                    >>>>>display this in a message box).
                    >>>>>The DLL could raise an exception to signal it has a problem.
                    >>>>>>
                    >>>>>In this particular case (looks like a technical error message), my
                    >>>>>personal preference is rather to display a generic message to the
                    >>>>>user and to warn the support team (after all the user won't be able
                    >>>>>to do anything else than calling the support team if the DSN is not
                    >>>>>defined) .
                    >>>>>>
                    >>>>>--
                    >>>>>Patrice
                    >>>>>>
                    >>>>>"Betina Andersen" <byl@invalid.co ma écrit dans le message de news:
                    >>>>>OLfpkQKrGHA.451 2@TK2MSFTNGP04. phx.gbl...
                    >>>>>I have inherited a VB.NET dll that I am using from common asp.
                    >>>>>>
                    >>>>>My problem is to get the messages from the dll to the Ie client, I
                    >>>>>can see the messages in the Eventlog on the IIS server so I know they
                    >>>>>are there, but how do I get them to show in IE?
                    >>>>>>
                    >>>>>The original code was:
                    >>>>>MsgBox("Ku nne ikke finde databasenavn udfra den angivne DSN: " & DSN)
                    >>>>>I tried to change that to:
                    >>>>>>
                    >>>>>Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den
                    >>>>>angivne DSN: " & DSN, "Fejl", MessageBoxButto ns.OK,
                    >>>>>MessageBox Icon.Error, MessageBoxDefau ltButton.Button 1,
                    >>>>>MessageBox Options.Default DesktopOnly, False)
                    >>>>>>
                    >>>>>But they still dont show up on the client, so how do I do that?
                    >>>>>>
                    >>>>>>
                    >>>>>>
                    >>>>>Thanks
                    >>>>>>
                    >>>>>Betina
                    >>>>>>
                    >>>>>>
                    >>>>>
                    >>>>>
                    >>>>
                    >>>>
                    >>>
                    >>>
                    >>
                    >>
                    >
                    >

                    Comment

                    • Cor Ligthert [MVP]

                      #11
                      Re: Msgbox to asp client?

                      Betina,

                      Than it is obvious that you cannot use it to let it direct reach a webpage,
                      which it does not even know.

                      You can of course throw an error and let that be catched when you are
                      calling your DLL in a try and catch block. Than you can show the error in
                      the way I wrote.

                      http://msdn2.microsoft.com/en-us/library/ty79csek.aspx

                      I hope this helps,

                      Cor

                      "Betina Andersen" <byl@invalid.co mschreef in bericht
                      news:uLdpHuxrGH A.4988@TK2MSFTN GP03.phx.gbl...
                      >I have a DLL written in VB:NET that DLL am I using from pure asp, the
                      >VB:NET DLL consists of a lot og subs and functions which I call from my asp
                      >page.
                      >
                      Regards Betina
                      >
                      "Cor Ligthert [MVP]" <notmyfirstname @planet.nlskrev i en meddelelse
                      news:uKV7JNxrGH A.4272@TK2MSFTN GP03.phx.gbl...
                      >What is that Net.dll
                      >>
                      >The system.net?
                      >>
                      >Cor
                      >>
                      >"Betina Andersen" <byl@invalid.co mschreef in bericht
                      >news:%23z9qpHx rGHA.1140@TK2MS FTNGP05.phx.gbl ...
                      >>But how can I add a panel when I do not have a userinterface in the .NET
                      >>dll?
                      >>>
                      >>Regards Betina
                      >>>
                      >>"Cor Ligthert [MVP]" <notmyfirstname @planet.nlskrev i en meddelelse
                      >>news:OlkcJYwr GHA.1604@TK2MSF TNGP05.phx.gbl. ..
                      >>>Betina,
                      >>>>
                      >>>The most easiest way for this is to create some labels on a panel that
                      >>>you hide when don't need it.
                      >>>>
                      >>>One of the labels is your messagetext.
                      >>>>
                      >>>Cor
                      >>>>
                      >>>"Betina Andersen" <byl@invalid.co mschreef in bericht
                      >>>news:O9nMO$v rGHA.4852@TK2MS FTNGP05.phx.gbl ...
                      >>>>>I did send Response to my sub - then I used
                      >>>>>
                      >>>>Response.Wr ite "Some message"
                      >>>>Response.Fl ush
                      >>>>>
                      >>>>But I cannot seem to get anything through to my client (IE) - what do
                      >>>>I do wrong?
                      >>>>>
                      >>>>Regard Betina
                      >>>>>
                      >>>>"Betina Andersen" <byl@invalid.co mskrev i en meddelelse
                      >>>>news:eQU7Wj urGHA.2124@TK2M SFTNGP05.phx.gb l...
                      >>>>>So will I have to send the Response Object to my DLL and return it on
                      >>>>>error, is that what you are saying?
                      >>>>>>
                      >>>>>Regards Betina
                      >>>>>>
                      >>>>>"Patrice " <scribe@chez.co mskrev i en meddelelse
                      >>>>>news:%23U% 23tSdKrGHA.4632 @TK2MSFTNGP05.p hx.gbl...
                      >>>>>>Keep in mind that the DLL runs server side so the message box is
                      >>>>>>"shown" server side (actually written in the log as it runs in a non
                      >>>>>>interacti ve context).
                      >>>>>>>
                      >>>>>>To show a message client side you have to send it to the browser in
                      >>>>>>the response (either as plain HTML or as a client side script that
                      >>>>>>display this in a message box).
                      >>>>>>The DLL could raise an exception to signal it has a problem.
                      >>>>>>>
                      >>>>>>In this particular case (looks like a technical error message), my
                      >>>>>>persona l preference is rather to display a generic message to the
                      >>>>>>user and to warn the support team (after all the user won't be able
                      >>>>>>to do anything else than calling the support team if the DSN is not
                      >>>>>>defined ).
                      >>>>>>>
                      >>>>>>--
                      >>>>>>Patrice
                      >>>>>>>
                      >>>>>>"Betina Andersen" <byl@invalid.co ma écrit dans le message de news:
                      >>>>>>OLfpkQKrGHA.451 2@TK2MSFTNGP04. phx.gbl...
                      >>>>>>I have inherited a VB.NET dll that I am using from common asp.
                      >>>>>>>
                      >>>>>>My problem is to get the messages from the dll to the Ie client, I
                      >>>>>>can see the messages in the Eventlog on the IIS server so I know
                      >>>>>>they are there, but how do I get them to show in IE?
                      >>>>>>>
                      >>>>>>The original code was:
                      >>>>>>MsgBox("K unne ikke finde databasenavn udfra den angivne DSN: " &
                      >>>>>>DSN)
                      >>>>>>I tried to change that to:
                      >>>>>>>
                      >>>>>>Result = MessageBox.Show ("Kunne ikke finde databasenavn udfra den
                      >>>>>>angivne DSN: " & DSN, "Fejl", MessageBoxButto ns.OK,
                      >>>>>>MessageBo xIcon.Error, MessageBoxDefau ltButton.Button 1,
                      >>>>>>MessageBo xOptions.Defaul tDesktopOnly, False)
                      >>>>>>>
                      >>>>>>But they still dont show up on the client, so how do I do that?
                      >>>>>>>
                      >>>>>>>
                      >>>>>>>
                      >>>>>>Thanks
                      >>>>>>>
                      >>>>>>Betina
                      >>>>>>>
                      >>>>>>>
                      >>>>>>
                      >>>>>>
                      >>>>>
                      >>>>>
                      >>>>
                      >>>>
                      >>>
                      >>>
                      >>
                      >>
                      >
                      >

                      Comment

                      Working...