Solved

How to display messagebox in asp.net VB class

Posted on 2011-03-23
3
639 Views
Last Modified: 2012-06-27
how to display message in vb.net class .I have to display message in vb.net class file.name of the file is new.vb.I want to display message in vb class file
0
Comment
Question by:itgirl7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Expert Comment

by:nandithaa
ID: 35204301
Try this:
System.Web.HttpContext.Current.Response.Write("<script>alert('" + ex.Message & "')</script>")

Open in new window

0
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 35204360
hi itgirl7,
first, in vb.net add reference to System.Windows.Forms.dll:
- select from the menu: "Project" then "Add Reference"
- from ".NET" tab select "System.Windows.Forms"
- press "Ok"button.

now import namespace Imports System.Windows.Forms
- add "Imports System.Windows.Forms" to the top of the class module
- then you can use Messagebox.Show() to display the messagebox
0
 
LVL 11

Accepted Solution

by:
Deepak Lakkad earned 500 total points
ID: 35204871
If you want to use messagebox in ASP.Net Application, you have to use JavaScript's Alert() function.

MessageBox will be applicable to WinForms application not for ASP.Net applications

- Deepak
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
asp.net, radiobuttonlist, c# 3 70
CSS question 16 63
.Net remove carriage returns, line feeds and tabbs 5 38
Word formfield existence 3 16
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question