-
Dec 21st, 2010, 08:56 AM
#1
Thread Starter
New Member
how to popup message box on the client side
Hi all,
I am coding with VB.Net 2005.
I have an issue popping up a message box on the client's side.
The message box works well when running the application on my
local machine, but when the site is hosted on the server, there is an
error showing a conventional message box() in vb.net 2005 on the
client's machine.
can anyone please help me with the script to pop up a message box
on the client's side when the site is hosted.
Thanks
-
Dec 21st, 2010, 09:04 AM
#2
Re: how to popup message box on the client side
Hello,
And welcome to the forums!!
The problem here is the fact that you are using MessageBox.Show(). This class exists within the System.Windows.Forms namespace, and as such, has no place in a Web Application. It "works" on your local machine because while debugging out of Visual Studio your machine is both the server, and the client. As soon as you move it onto another machine, i.e. a server, it will stop working.
There are techniques that you can use, such as a JavaScript alert, which would allow you to pop up a message, or you could simply write the message out to a label on your page.
Gary
-
Dec 21st, 2010, 09:56 AM
#3
Hyperactive Member
Re: how to popup message box on the client side
you can use Jquery modal Popup.
-
Dec 21st, 2010, 09:58 AM
#4
Re: how to popup message box on the client side
Originally Posted by dnanetwork
you can use Jquery modal Popup.
This is what Dana is referring to:
http://plugins.jquery.com/plugin-tags/modal-popup
Gary
-
Dec 21st, 2010, 10:31 AM
#5
Thread Starter
New Member
Re: how to popup message box on the client side
Thanks Gary n Dana,
Don't understand how to use the jquery in my vb.net code, please
can i get i tip on this? alternatively is there a java script code i can use
in my code?
-
Dec 21st, 2010, 10:37 AM
#6
Re: how to popup message box on the client side
As I already mentioned you could get a simple JavaScript alert box:
http://www.tizag.com/javascriptT/javascriptalert.php
As for getting jQuery working within your application, have a look here:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=231
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|