473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How do you pop up a message (like messagebox.show)?

I would like my error handler to pop up a message on my webform. How do you
do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!
Nov 17 '05 #1
10 8081
You can do this only by a client-side code.

"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like my error handler to pop up a message on my webform. How do you do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!

Nov 17 '05 #2
You can do this only by a client-side code.

"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like my error handler to pop up a message on my webform. How do you do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!

Nov 17 '05 #3
You can add a JavaScript to the HTML output:

alert(message)
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like my error handler to pop up a message on my webform. How do you do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!

Nov 17 '05 #4
You can add a JavaScript to the HTML output:

alert(message)
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like my error handler to pop up a message on my webform. How do you do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!

Nov 17 '05 #5
I wanted to pop up a message whenever my general error handling routing was
run. The message would tell the user what the error was. Do I have to
DYNAMICALLY place this alert message on the offending page? If so, can you
post an example of how to do this?

"Scott M." <s-***@badspamsnet.net> wrote in message
news:ed****************@TK2MSFTNGP12.phx.gbl...
You can add a JavaScript to the HTML output:

alert(message)
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like my error handler to pop up a message on my webform. How do

you
do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!


Nov 17 '05 #6
I wanted to pop up a message whenever my general error handling routing was
run. The message would tell the user what the error was. Do I have to
DYNAMICALLY place this alert message on the offending page? If so, can you
post an example of how to do this?

"Scott M." <s-***@badspamsnet.net> wrote in message
news:ed****************@TK2MSFTNGP12.phx.gbl...
You can add a JavaScript to the HTML output:

alert(message)
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like my error handler to pop up a message on my webform. How do

you
do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!


Nov 17 '05 #7
There are a couple of ways but this works:

If yourCodeThatChecksForAnError then
response.write("<Script
Language='JavaScript'>alert(yourErrorMessage)</Script>")
End If
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I wanted to pop up a message whenever my general error handling routing was run. The message would tell the user what the error was. Do I have to
DYNAMICALLY place this alert message on the offending page? If so, can you post an example of how to do this?

"Scott M." <s-***@badspamsnet.net> wrote in message
news:ed****************@TK2MSFTNGP12.phx.gbl...
You can add a JavaScript to the HTML output:

alert(message)
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like my error handler to pop up a message on my webform. How
do you
do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!



Nov 17 '05 #8
There are a couple of ways but this works:

If yourCodeThatChecksForAnError then
response.write("<Script
Language='JavaScript'>alert(yourErrorMessage)</Script>")
End If
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I wanted to pop up a message whenever my general error handling routing was run. The message would tell the user what the error was. Do I have to
DYNAMICALLY place this alert message on the offending page? If so, can you post an example of how to do this?

"Scott M." <s-***@badspamsnet.net> wrote in message
news:ed****************@TK2MSFTNGP12.phx.gbl...
You can add a JavaScript to the HTML output:

alert(message)
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like my error handler to pop up a message on my webform. How
do you
do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!



Nov 17 '05 #9
Another good way is to use the 'RegisterClientScriptBlock' method, and pass
it the '<Script> ... </Script>' string with the javascript you would like
to use.

-Darrin
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I wanted to pop up a message whenever my general error handling routing was run. The message would tell the user what the error was. Do I have to
DYNAMICALLY place this alert message on the offending page? If so, can you post an example of how to do this?

"Scott M." <s-***@badspamsnet.net> wrote in message
news:ed****************@TK2MSFTNGP12.phx.gbl...
You can add a JavaScript to the HTML output:

alert(message)
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like my error handler to pop up a message on my webform. How
do you
do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!



Nov 17 '05 #10
Another good way is to use the 'RegisterClientScriptBlock' method, and pass
it the '<Script> ... </Script>' string with the javascript you would like
to use.

-Darrin
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
I wanted to pop up a message whenever my general error handling routing was run. The message would tell the user what the error was. Do I have to
DYNAMICALLY place this alert message on the offending page? If so, can you post an example of how to do this?

"Scott M." <s-***@badspamsnet.net> wrote in message
news:ed****************@TK2MSFTNGP12.phx.gbl...
You can add a JavaScript to the HTML output:

alert(message)
"VB Programmer" <gr*********@go-intech.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I would like my error handler to pop up a message on my webform. How
do you
do this?

Currently I'm using System.Web.HttpContext.Current.Response.Write("MY
ERROR")

Any ideas? Thanks!



Nov 17 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Coleen | last post by:
I'm using MS .Net Version 7, using VB .Net working on a "simple" web page. All I want to do is display a messagebox. I tried using Messagebox.Show, and get an error that Messagebox has not been...
0
by: Kimmo Laine | last post by:
Hi, i have the a test app ( Sender ) with 3 buttons: first will open/create queue, second will send the message and third will close the queue. Here is the code private void...
0
by: chathurangakw | last post by:
Hi , I'm working on a smart client application. In one of my forms I have a socket instance which listens for any messages from others and there are some other windows forms too. when the...
14
by: A.A. Fussy | last post by:
What code would I use for displaying a message box in VB.NET
2
by: Patrick | last post by:
Hello - I am wondering what the command is for breaking quoted text over multiple lines for formatting in my code. An example is MessageBox.Show("You Fool! The number of registrants cannot be 0....
4
by: Larry Woods | last post by:
I have a Messagebox that looks like: MessageBox.Show("There are pending changes for this patient. Do you want to continue to close?", "Pending Changes", MessageBoxButtons.YesNo,...
2
by: jburkle | last post by:
The following is the onclick method called when the "Renew" button is clicked by the user in my Windows application: ..... Private Sub cmdRenew_Click(ByVal eventSender As System.Object, ByVal...
12
by: jburkle | last post by:
Hello all, I am still having an issue where multiple Message Boxes are being displayed to the user from the same form at one time. This issue hides the boxes behind the forms since the forms take...
2
by: =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post by:
Hi, I am wondering why the .NET Framework is quite different from Win32 API when it comes to displaying system modal message boxes. Consider the four following types of system modal message...
9
by: =?Utf-8?B?a2FyaW0=?= | last post by:
Hello All, Is it possible in vb 08 to set a message box to pop up when you click a button and have a cod that sets a time in seconds so that lets say after 5 sec. the message box closes by itself...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.