CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.web_forms Tags:
Item Type: NewsGroup Date Entered: 3/4/2005 4:02:38 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 1 Favorited: 0 Favorite
4 Items, 1 Pages 1 |< << Go >> >|
sophistLady
Asp.Net User
Error messagebox3/4/2005 4:02:38 AM

0/0

Hi, I managed to get the pop up messagebox. This is what I have..


If a < b Then
Me.RegisterStartupScript("Error", "<script language='javascript'>alert('Its not time yet!');</script>")
Response.Redirect("http://localhost/OTO/Page2.aspx")
Else
..
..


When I use the code as above, the messagebox does not appear but it automatically direct to Page2.aspx. What i want is, after user click on "ok"..it redirect to Page2.aspx.
Can anybody help? Thank you.
CInners
Asp.Net User
Re: Error messagebox3/4/2005 1:57:24 PM

0/0

You need to dim the message box then

If a < B write out the Error ( Messagebox.show(Re)

end if

Then if messagebox.YesNo = ? redirect to error page
plblum
Asp.Net User
Re: Error messagebox3/4/2005 5:48:12 PM

0/0

Please do not use MessageBox.Show(). Its a server side (Windows) technology that doesn't go to the browser.

Your confusion is that you are trying to mix together steps that must occur on the browser and server separately. Until the page is delivered to the browser, any javascript will not execute. The RegisterStartupScript statement just adds your text (javascript) to the page due to be outputted. But you haven't sent that page along. That happens by letting the page completely generate.

When the browser is done, it makes a request on the server (an HTTP GET or POST) which you can use to determine the next action.

If you need to show an error message on the browser, add your javascript to the original page. Write that javascript to detect the problem up front and show the message without allowing the page to submit. This kind of coding can be very difficult if you are not familiar with Javascript and DHTML.

Recommendation: Use the Validator controls to detect errors and block a page from being submitted. You can even have it show an alert by adding a ValidationSummary control with its ShowMessageBox property set to true.
--- Peter Blum
Creator of Professional Validation And More Suite, Peter's Date Package, and Peter's Polling Package
www.PeterBlum.com
Jos Branders
Asp.Net User
Re: Error messagebox3/4/2005 6:44:50 PM

0/0

Try this:

If a < b  Then

Me.RegisterStartupScript("Error", "<script language='javascript'>alert('Its not time yet!');location.href='http://localhost/OTO/Page2.aspx';</script>")
Else
.
.

Jos
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
VBA for Dummies Authors: John Paul Mueller, Pages: 411, Published: 2007
Designing Groundwater Models with Windows Authors: William Clarence Walton, Pages: 196, Published: 1994
About Face 3: The Essentials of Interaction Design Authors: Alan Cooper, Robert Reimann, David Cronin, Pages: 610, Published: 2007
The Unofficial Guide to Access 2007 Authors: Jim Keogh, Pages: 638, Published: 2007
SWT: A Developer's Notebook Authors: Tim Hatton, Pages: 297, Published: 2004
Excel 2007 Data Analysis For Dummies Authors: Stephen L. Nelson, Pages: 356, Published: 2007
.NET Development Security Solutions Authors: John Mueller, Pages: 472, Published: 2003
Macromedia Director MX 2004 Bible Authors: Brian Underdahl, John R. Nyquist, Robert Martin, Pages: 874, Published: 2004
About Face 2.0: The Essentials of Interaction Design Authors: Alan Cooper, Robert Reimann, Pages: 540, Published: 2003

Web:
RE: Wix Error Message Box: msg#00150 windows.devel.wix.user Nov 10, 2004 ... RE: Wix Error Message Box - Find Help in our windows.devel.wix.user Forum.
Copy message box text to the clipboard - ChuckOp's eXPeriences Particular one with an obscure error number like 0x80040e09? Starting with Windows 2000, you can copy the entire contents of a message box to the clipboard ...
Helping Users Out of the Error Message Box - Office 2000 Resource ... You can link a custom button in the error message box to additional information by extending the error message to include comprehensive or updated ...
» Copy Text From Error Message Box One of the common situation that Windows-based computer user usually faces in their daily computing life is having error message box popped-out that they ...
Disable the error message box while loading an external movie with ... I have a compiled swf file and a I can't edit it, but the movie is working fine (but gives an error message with a message box). ...
desktop-eclipse: Issue ID artf6: Scary error message box when user ... Jun 24, 2008 ... An error dialog is displayed with a message that shows only the repository URL. If an invalid user ID is specified, or a valid user ID and ...
MessageBox - error - CodeGuru Forums I am getting an error message as : error C2660: 'MessageBoxA' : function does not take 4 parameters. But if i use MessageBox("Not present"); ...
» Create Fake & Funny Windows Error Message Box Nov 10, 2008 ... An average Windows user would have seen Windows error message box once in a while. Most of these error messages are sane which guide you and ...
MapleStory EMPTY ERROR Message Box Solution « Ayumilove MapleStory ... Sep 21, 2008 ... Technical FAQ MapleStory Nprotect Keycrypt error Solution (Vista + XP) MapleStory EMPTY ERROR Message Box Solution . ...
MySQL Bugs: #37451: Error message box show up when starting the ... Bug #37451, Error message box show up when starting the dashboard. Submitted: 17 Jun 2008 17:46, Modified: 3 Jul 2008 17:29. Reporter: Toru Sugiahra ...

Videos:
Windows Tricks - How to make an Error Message Box A demonstration of how to make an error message box. Code is a = MsgBox("TEXT",3 , "TITLE ...
How to create your own fake error box/message box WATCH : http://www.youtube.com/watch?v=ioKu4gpmaAo&feature for more advanced msgbox/fake error box READ!! : do you want to make you message box ...
How to create your own Error/Virus message box Save all vbs script files with the extension .vbs! ~Credits To~ TenaciousBastard PCcmd
How to make a advanced msgbox/error box!!! Code: a = MsgBox("Choose yes or no",3 , "Question") if a = vbYes then b = MsgBox("You Choosed Yes", , "Huray") else c = MsgBox("You choosed ...
how to make error msgbox x= msgbox ("type your text here",100+100,"type your heading here")
Vbscript message box part 2 ising buttons to do things ... Part 2 by miutubevids for knowign what numbers to use with the buttons 1 = OK 2 = Cancel 3 = Abort 4 = Retry 5 = Ignore 6 = Yes 7 = No Code ...
How To Make An Error Messege Box You Can Make An Error Messege box, its cool, prank your friends! Heres the code, Do it on notepad: x= msgbox ("WHAT IS GNNA SAY IN THE BOX ...
How to make a fake Error Messages and change the button TEXT!! error messages made from http://atom.smasher.org
How to make Pop up error boxes part 2 Read Please Annoy friends or experiment with it Visual Basic scripting the next part to my video Scripts: Looping Error box: Do X = msgbox ...
Vbscript Pop UP Message Box full tutorial with code Advanced ... In part 2 i will show you how to use the buttons seperatly msgbox("simple msgbox"),0,("Miutubevids") save as vbs Messege icons and buttons code ...




Search This Site:










validationexpression for alphanumeric characters

dynamically creating and adding the calendar control to a web page.

help needed on popup box

radiobutton checked change event not working properly.

is it possible to fire postback from code behind?

get checked value of dynamic created radiobutton

button click firing on a page refresh

how to take text from dynamically created table in asp.net(vb)

how to call xml api in asp.net 2.0

how do i add an onload javascript tag from c#?

microsoft expression web problem

using regular expressions to force passwords to conform to rules

multiline textbox

image/database question from a real newbie...

xmleditgrid with web matrix

evaluate my current error handling process...

how to get client date time

excel exporting

nesting labels

hyperlink

asp.net button event handlers not triggering

remote host environment variables

how to validate email address dynamically without using a regularexpressionvalidator control?

help with customvalidator function...

form not submitting

calendar control disappears when next month > is clicked?

handling events and exposing properties

how to store (and process) a redirected page

showing a page from a different web site?

rangevalidator problem

  Privacy | Contact Us
All Times Are GMT