Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 February 21st, 2005, 02:39 PM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Simple ASP.NET message box with VB

Hello,

Please help me out here.

I would like to have a message box to tell me that a name is not found in the database after searching name in the database. I don't want an 'onClick'... for example:

 If txtCheckingName.Text = Nothing or rows = 0 Then
     Say("Your input is blank. Please try again.")
     Response.Redirect("update.aspx")
 End If

What did I do wrong here ?

I am not sure if I should put "Response.Redirect("update.aspx") because it doesn't give a message box a chance to appear ??

Thanks in advance for anybody who helps me.



 
Old February 24th, 2005, 03:31 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

in ASP.NET we don't have messagebox,]
Code:
StringBuilder sb=new  StringBuilder(0);
sb.Append("<script language=JavaScript>window.alert('Saved')</script>");
if(!this.IsClientScriptBlockRegistered("clientScript"))
     this.RegisterClientScriptBlock("clientScript", sb.ToString());
RegisterClientScriptBlock writes that simple script in the top of the form.

_____________
Mehdi.
software student.





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
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.