Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 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 Search this Thread Display Modes
  #1 (permalink)  
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#

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?
  #2 (permalink)  
Old August 31st, 2010, 03:14 PM
Registered User
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

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?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
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

All times are GMT -4. The time now is 07:38 PM.

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