Wrox Programmer Forums
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 23rd, 2010, 01:54 PM
Authorized User
 
Join Date: Mar 2010
Posts: 65
Thanks: 6
Thanked 0 Times in 0 Posts
Default Message Box in ASP 3.5/C#

Hello,
I want to display a error message in a Message box in C#. So i tried the following :

Page.RegisterStartupScript("ScriptDescription", "<script type=\"text/javascript\"> alert('Please Enter a valid Comments');</script>");

-Sometimes the alert message is popping out and sometimes its not popping.

-Sometimes after it popps out, after i close the browser window, it gives me the following error:

"Microsoft Jscript Runtime Error:
Handler was not added through the SYS.UI.DOMEVENT.ADDHANDLER method."

-can anyone explain what went wrong?
 
Old August 31st, 2010, 03:14 PM
Registered User
 
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

It Seems to b fine.
u can try using
ClientScript.RegisterStartupScript(typeof(Page),"S criptDescription", "<script type=\"text/javascript\"> alert('MyMessage');</script>");

which browser u r using?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Message Box in ASP 3.5/C# Gayathri79 ASP.NET 3.5 Basics 2 July 26th, 2010 07:05 PM
Message box in ASP.NET hbansal ASP.NET 1.0 and 1.1 Professional 3 July 27th, 2007 10:41 AM
ASP Message Box Nilesh Barhate Classic ASP Basics 1 July 25th, 2005 01:00 PM
Message Box In ASP Nilesh Barhate Classic ASP Basics 0 July 20th, 2005 06:07 AM
Message box in ASP shazia1 VS.NET 2002/2003 1 June 25th, 2005 03:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.