RSS Forums RSS

Message Box

Please support our VB.NET advertiser: DiscountASP.NET – 3 Months Free on VB.NET Web Hosting
Reply
Posts: 25
Reputation: tyserman5674 is an unknown quantity at this point 
Solved Threads: 0
tyserman5674 tyserman5674 is offline Offline
Light Poster

Message Box

  #1  
Nov 9th, 2008
Hi All,
Can anyone please help me out here? I have been trying now for about 6 hours on trying to convert this code from vb.net to asp.net
MessageBox.Show("Press OK To Continue..", "Mortgage Amortization Table", MessageBoxButtons.OK, MessageBoxIcon.Question)
All I want to do is after displaying 20 lines of a schedule for the list box to pause until the OK button is clicked. Then it is to display another 20 lines of the schedule, OK button clicked again, until it is complete.
Any help would be appreciated, very much.
Thanks,
Ken
AddThis Social Bookmark Button
Reply With Quote  
Posts: 15,222
Reputation: jbennet is a glorious beacon of light jbennet is a glorious beacon of light jbennet is a glorious beacon of light jbennet is a glorious beacon of light jbennet is a glorious beacon of light jbennet is a glorious beacon of light 
Solved Threads: 455
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Message Box

  #2  
Nov 9th, 2008
use javascript for the messagebox
Master of puppets Im pulling your strings - blinded by me, you cant see a thing. Master! Master!

If i am helpful, please give me reputation points.
Reply With Quote  
Posts: 31
Reputation: reena12 is an unknown quantity at this point 
Solved Threads: 4
reena12 reena12 is offline Offline
Light Poster

Re: Message Box

  #3  
Nov 10th, 2008
hi,

I think messagebox will not work in ASP.NET.
you can solve it through JAVA SCRIPT
Reena Mehta

Remember to click on Mark as answer on the post that helped

http://www.indianic.com
Reply With Quote  
Posts: 64
Reputation: Renukavani is an unknown quantity at this point 
Solved Threads: 6
Renukavani Renukavani is offline Offline
Junior Poster in Training

Re: Message Box

  #4  
Nov 11th, 2008
hi
c this code
MessageBox.aspx
<%@ Page Language="vb" AutoEventWireup="false"

Codebehind="MessageBox.aspx.vb" Inherits="ASPMessageBox.MessageBox1"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>

<HEAD>

<title>MessageBox</title>

<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">

<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">

<meta name="vs_defaultClientScript" content="JavaScript">

<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">

</HEAD>

<body MS_POSITIONING="GridLayout">

<form id="Form1" method="post" runat="server">

<asplaceHolder id="PlaceHolder1" runat="server"></asplaceHolder>

<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 95px; POSITION: absolute; TOP: 99px" runat="server" Text="Click"></asp:Button>

</form>

</body>

</HTML>

MessageBox.aspx.vb
Public Class MessageBox1

Inherits System.Web.UI.Page

Protected WithEvents PlaceHolder1 As System.Web.UI.WebControls.PlaceHolder

Protected WithEvents Button1 As System.Web.UI.WebControls.Button

Dim newBox As MessageBox = New MessageBox()

#Region " Web Form Designer Generated Code "


'This call is required by the Web Form Designer.

<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()


End Sub


Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init

'CODEGEN: This method call is required by the Web Form Designer

'Do not modify it using the code editor.

InitializeComponent()

End Sub


#End Region




Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'Put user code to initialize the page here

CheckYesNo()

End Sub





Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

newBox.MessageBoxButton = 3

newBox.MessageBoxTop = 50

newBox.MessageBoxLeft = 150

newBox.MessageBoxWidth = 300

newBox.MessageBoxHeight = 150

newBox.MessageBoxButtonWidth = 50

newBox.MessageBoxIDYes = "yesno"

newBox.MessageBoxIDNo = "yesno"

newBox.MessageBoxIDCancel = "yesno"

newBox.MessageBoxButtonYesText = "Yes"

newBox.MessageBoxButtonNoText = "No"

newBox.MessageBoxButtonCancelText = "Cancel"

newBox.MessageBoxTitle = "Dynamic message box."

newBox.MessageBoxMessage = "Do you want to continue?"

newBox.MessageBoxImage = "information.gif"

PlaceHolder1.Controls.Add(newBox)

End Sub

Private Sub CheckYesNo()

If Request.Form("yesno") = "Yes" Then

Response.Write("Button - Yes - Selected")

ElseIf Request.Form("yesno") = "No" Then

Response.Write("Button - No - Selected")

ElseIf Request.Form("yesno") = "Cancel" Then

Response.Write("Button - Cancel - Selected")

End If

End Sub

End Class

otherwise c the link
http://www.dnzone.com/ShowDetail.asp?NewsId=861



if ur problem solved plz mask as solved
Reply With Quote  
Posts: 25
Reputation: tyserman5674 is an unknown quantity at this point 
Solved Threads: 0
tyserman5674 tyserman5674 is offline Offline
Light Poster

Re: Message Box

  #5  
Nov 11th, 2008
Renukavani,
Thank you very much for your reply, you had to of spent a little time on i, thanks again.
Now I have to try and decipher it.
Thanks,
Ken
Reply With Quote  
Posts: 143
Reputation: sierrainfo is an unknown quantity at this point 
Solved Threads: 9
sierrainfo sierrainfo is offline Offline
Junior Poster

Re: Message Box

  #6  
Nov 18th, 2008
Dim strMessage As String
strMessage = "Connection is Created"
'finishes server processing, returns to client.
Dim strScript As String = "<script language=JavaScript>"
strScript += "alert(""" & strMessage & """);"
strScript += "</script"
If (Not ClientScript.IsStartupScriptRegistered("clientScript")) Then
ClientScript.RegisterClientScriptBlock(Me.GetType(), "clientScript", strScript)
End If
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Views: 1456 | Replies: 5 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:44 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC