Home All Groups Group Topic Archive Search About

Msgbox to asp client?

Author
21 Jul 2006 8:59 AM
Betina Andersen
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", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly, False)

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



Thanks

Betina

Author
21 Jul 2006 9:23 AM
Patrice
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" <b**@invalid.com> a écrit dans le message de news:
OLfpkQKrGHA.4***@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", MessageBoxButtons.OK, MessageBoxIcon.Error,
MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly,
False)

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



Thanks

Betina
Author
24 Jul 2006 6:16 AM
Betina Andersen
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

Show quoteHide quote
"Patrice" <scr***@chez.com> skrev i en meddelelse
news:%23U%23tSdKrGHA.4632@TK2MSFTNGP05.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 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" <b**@invalid.com> a écrit dans le message de news:
> OLfpkQKrGHA.4***@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", MessageBoxButtons.OK, MessageBoxIcon.Error,
> MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly,
> False)
>
> But they still dont show up on the client, so how do I do that?
>
>
>
> Thanks
>
> Betina
>
>
Author
24 Jul 2006 9:01 AM
Betina Andersen
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

Show quoteHide quote
"Betina Andersen" <b**@invalid.com> skrev i en meddelelse
news:eQU7WjurGHA.2124@TK2MSFTNGP05.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" <scr***@chez.com> skrev i en meddelelse
> news:%23U%23tSdKrGHA.4632@TK2MSFTNGP05.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 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" <b**@invalid.com> a écrit dans le message de news:
>> OLfpkQKrGHA.4***@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", MessageBoxButtons.OK, MessageBoxIcon.Error,
>> MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly,
>> False)
>>
>> But they still dont show up on the client, so how do I do that?
>>
>>
>>
>> Thanks
>>
>> Betina
>>
>>
>
>
Author
24 Jul 2006 9:47 AM
Cor Ligthert [MVP]
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

Show quoteHide quote
"Betina Andersen" <b**@invalid.com> schreef in bericht
news:O9nMO$vrGHA.4852@TK2MSFTNGP05.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" <b**@invalid.com> skrev i en meddelelse
> news:eQU7WjurGHA.2124@TK2MSFTNGP05.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" <scr***@chez.com> skrev i en meddelelse
>> news:%23U%23tSdKrGHA.4632@TK2MSFTNGP05.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 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" <b**@invalid.com> a écrit dans le message de news:
>>> OLfpkQKrGHA.4***@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", MessageBoxButtons.OK,
>>> MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
>>> MessageBoxOptions.DefaultDesktopOnly, False)
>>>
>>> But they still dont show up on the client, so how do I do that?
>>>
>>>
>>>
>>> Thanks
>>>
>>> Betina
>>>
>>>
>>
>>
>
>
Author
24 Jul 2006 11:10 AM
Betina Andersen
But how can I add a panel when I do not have a userinterface in the .NET
dll?

Regards Betina

Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> skrev i en meddelelse
news:OlkcJYwrGHA.1604@TK2MSFTNGP05.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" <b**@invalid.com> schreef in bericht
> news:O9nMO$vrGHA.4852@TK2MSFTNGP05.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" <b**@invalid.com> skrev i en meddelelse
>> news:eQU7WjurGHA.2124@TK2MSFTNGP05.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" <scr***@chez.com> skrev i en meddelelse
>>> news:%23U%23tSdKrGHA.4632@TK2MSFTNGP05.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
>>>> 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" <b**@invalid.com> a écrit dans le message de news:
>>>> OLfpkQKrGHA.4***@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", MessageBoxButtons.OK,
>>>> MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
>>>> MessageBoxOptions.DefaultDesktopOnly, False)
>>>>
>>>> But they still dont show up on the client, so how do I do that?
>>>>
>>>>
>>>>
>>>> Thanks
>>>>
>>>> Betina
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
24 Jul 2006 11:22 AM
Cor Ligthert [MVP]
What is that Net.dll

The system.net?

Cor

Show quoteHide quote
"Betina Andersen" <b**@invalid.com> schreef in bericht
news:%23z9qpHxrGHA.1140@TK2MSFTNGP05.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]" <notmyfirstn***@planet.nl> skrev i en meddelelse
> news:OlkcJYwrGHA.1604@TK2MSFTNGP05.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" <b**@invalid.com> schreef in bericht
>> news:O9nMO$vrGHA.4852@TK2MSFTNGP05.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" <b**@invalid.com> skrev i en meddelelse
>>> news:eQU7WjurGHA.2124@TK2MSFTNGP05.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" <scr***@chez.com> skrev i en meddelelse
>>>> news:%23U%23tSdKrGHA.4632@TK2MSFTNGP05.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
>>>>> 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" <b**@invalid.com> a écrit dans le message de news:
>>>>> OLfpkQKrGHA.4***@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", MessageBoxButtons.OK,
>>>>> MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
>>>>> MessageBoxOptions.DefaultDesktopOnly, False)
>>>>>
>>>>> But they still dont show up on the client, so how do I do that?
>>>>>
>>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>> Betina
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
24 Jul 2006 12:19 PM
Betina Andersen
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

Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> skrev i en meddelelse
news:uKV7JNxrGHA.4272@TK2MSFTNGP03.phx.gbl...
> What is that Net.dll
>
> The system.net?
>
> Cor
>
> "Betina Andersen" <b**@invalid.com> schreef in bericht
> news:%23z9qpHxrGHA.1140@TK2MSFTNGP05.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]" <notmyfirstn***@planet.nl> skrev i en meddelelse
>> news:OlkcJYwrGHA.1604@TK2MSFTNGP05.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" <b**@invalid.com> schreef in bericht
>>> news:O9nMO$vrGHA.4852@TK2MSFTNGP05.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" <b**@invalid.com> skrev i en meddelelse
>>>> news:eQU7WjurGHA.2124@TK2MSFTNGP05.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" <scr***@chez.com> skrev i en meddelelse
>>>>> news:%23U%23tSdKrGHA.4632@TK2MSFTNGP05.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
>>>>>> 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" <b**@invalid.com> a écrit dans le message de news:
>>>>>> OLfpkQKrGHA.4***@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", MessageBoxButtons.OK,
>>>>>> MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
>>>>>> MessageBoxOptions.DefaultDesktopOnly, False)
>>>>>>
>>>>>> But they still dont show up on the client, so how do I do that?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Betina
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
24 Jul 2006 1:06 PM
Cor Ligthert [MVP]
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

Show quoteHide quote
"Betina Andersen" <b**@invalid.com> schreef in bericht
news:uLdpHuxrGHA.4988@TK2MSFTNGP03.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]" <notmyfirstn***@planet.nl> skrev i en meddelelse
> news:uKV7JNxrGHA.4272@TK2MSFTNGP03.phx.gbl...
>> What is that Net.dll
>>
>> The system.net?
>>
>> Cor
>>
>> "Betina Andersen" <b**@invalid.com> schreef in bericht
>> news:%23z9qpHxrGHA.1140@TK2MSFTNGP05.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]" <notmyfirstn***@planet.nl> skrev i en meddelelse
>>> news:OlkcJYwrGHA.1604@TK2MSFTNGP05.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" <b**@invalid.com> schreef in bericht
>>>> news:O9nMO$vrGHA.4852@TK2MSFTNGP05.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" <b**@invalid.com> skrev i en meddelelse
>>>>> news:eQU7WjurGHA.2124@TK2MSFTNGP05.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" <scr***@chez.com> skrev i en meddelelse
>>>>>> news:%23U%23tSdKrGHA.4632@TK2MSFTNGP05.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
>>>>>>> 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" <b**@invalid.com> a écrit dans le message de news:
>>>>>>> OLfpkQKrGHA.4***@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", MessageBoxButtons.OK,
>>>>>>> MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
>>>>>>> MessageBoxOptions.DefaultDesktopOnly, False)
>>>>>>>
>>>>>>> But they still dont show up on the client, so how do I do that?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Betina
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Author
21 Jul 2006 1:30 PM
tommaso.gastaldi
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:

Show quoteHide quote
> 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", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly, False)
>
> But they still dont show up on the client, so how do I do that?
>
>
>
> Thanks
>
> Betina
>
> ------=_NextPart_000_0006_01C6ACB4.CDF36910
> 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", MessageBoxButtons.OK,
> MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
> MessageBoxOptions.DefaultDesktopOnly, 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.CDF36910--
Author
24 Jul 2006 6:18 AM
Betina Andersen
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.gasta***@uniroma1.it> skrev i en meddelelse
Show quoteHide quote
news:1153488612.673452.181410@i3g2000cwc.googlegroups.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("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", MessageBoxButtons.OK, MessageBoxIcon.Error,
>> MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly,
>> False)
>>
>> But they still dont show up on the client, so how do I do that?
>>
>>
>>
>> Thanks
>>
>> Betina
>>
>> ------=_NextPart_000_0006_01C6ACB4.CDF36910
>> 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",
>> MessageBoxButtons.OK,
>> MessageBoxIcon.Error, MessageBoxDefaultButton.Button1,
>> MessageBoxOptions.DefaultDesktopOnly, 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.CDF36910--
>