Wrox Programmer Forums
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 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 June 25th, 2005, 01:58 AM
Authorized User
 
Join Date: Jun 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default Message box in ASP

i have used the following code to show msg box on web pages ..

In html add <span id=msg runat="server">
in web.aspx.cs need to declare as protected system.Web.UI.HtmlControls.HtmlGenericControl msg;
in where you want disply message use this code
msg.InnerHtml = "<script>alert('just added your message'); window.location='frmUserAdd.aspx';</script>";

now the problem is that .. when it shows the msg box & i click ok .. then the rest of the filled fields become blank ..
i want the filled data shud persists in the fields

can anyone help?
 
Old June 25th, 2005, 03:01 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Isn't that because you are redirecting the user (back??) to frmUserAdd.aspx? This code:

window.location='frmUserAdd.aspx';

tells the browser to load that page.....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: The Ship Song by Nick Cave & the Bad Seeds (Track 5 from the album: The Good Son) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Message box in ASP.NET hbansal ASP.NET 1.0 and 1.1 Professional 3 July 27th, 2007 10:41 AM
Yes No Message box dbartelt Access 7 October 28th, 2005 08:16 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
Simple ASP.NET message box with VB janicen General .NET 1 February 24th, 2005 03:31 AM





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