Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 16th, 2006, 04:20 AM
Registered User
 
Join Date: Dec 2006
Location: Coimbatore, Tamil Nadu, India.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default display messagebox in ASP.Net with VB.Net

Any one knows how to display the Message Box in ASP.net using VB.net.

Suersh Kumar, K
  #2 (permalink)  
Old December 20th, 2006, 11:28 AM
Registered User
 
Join Date: Dec 2006
Location: Clearwater, FL, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

javascript

  #3 (permalink)  
Old December 20th, 2006, 11:31 AM
Registered User
 
Join Date: Dec 2006
Location: Clearwater, FL, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

and if you need to do something that involves server side code use ajax

  #4 (permalink)  
Old December 21st, 2006, 02:33 AM
Friend of Wrox
Points: 1,935, Level: 17
Points: 1,935, Level: 17 Points: 1,935, Level: 17 Points: 1,935, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: United Kingdom
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

you can use javascript as below:

javascript:alert("Hi")

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.
  #5 (permalink)  
Old December 26th, 2006, 07:09 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you can use the following code:

MessageBox("Welcome to wrox forum")
Private Sub MessageBox(ByVal msg As String)
        Dim lbl As New Label
        lbl.Text = "<script language='javascript'>" & Environment.NewLine & _
               "window.alert('" + msg + "')</script>"
        Page.Controls.Add(lbl)
    End Sub
you tried this code.I always use this code

  #6 (permalink)  
Old December 28th, 2006, 05:55 AM
Authorized User
 
Join Date: May 2006
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://www.codeproject.com/aspnet/AspNetMsgBox.asp

Regards,
Rashida Jabeen
http://www.akaas.net
  #7 (permalink)  
Old March 20th, 2008, 03:08 PM
Registered User
 
Join Date: Mar 2008
Location: Leesville, LA, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ScepterMT Send a message via Yahoo to ScepterMT
Default

The best way I've found to do this is to create a static class MessageBox with a static method Show(), which will give you the ablility to to still use the syntax MessageBox.Show("Your Message"); and convert it into window.alert("Your Message");.

I've written a how to on my blog at: http://sceptermt.blogspot.com/2008/0...lass-in-c.html that shows the source code that I used in C# for my web application and details on how it works.

You could also write overloads for the static show() method to allow the class to do a javascript confirm() or a prompt(). I haven't needed that functionality yet so I've just kept it simple.

Check This out: http://www.sceptermarketingtechnologies.com
  #8 (permalink)  
Old November 5th, 2014, 06:31 PM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.net MessageBox

'ASP.net MessageBox
'Add a scriptmanager to the ASP.Net Page
Code:
 
<asp:scriptmanager id="ScriptManager1" runat="server" />
try:

Code:
 
Dim sMsg As String = "My Message"

ScriptManager.RegisterStartupScript(Page, Page.GetType, Guid.NewGuid().ToString(), "alert('" & sMsg & "')", True)
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MessageBox en ASP.NET bloparod ASP.NET Espanol 4 September 24th, 2014 03:16 PM
Creating a MessageBox in Asp.Net ScepterMT ASP.NET 2.0 Basics 3 March 24th, 2008 02:01 PM
Parse XML doc using VB.NET into ASP.NET page kwilliams Classic ASP XML 17 November 11th, 2005 10:42 AM
VB.NET MESSAGEBOX s_gopi_n VB.NET 2002/2003 Basics 7 September 22nd, 2005 03:24 AM



All times are GMT -4. The time now is 06:26 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.