Wrox Programmer Forums
|
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 September 11th, 2004, 12:56 AM
Registered User
 
Join Date: Sep 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default msgbox

hi
  i want to know how to implement msgbox() in asp.net, please give me replay.


 
Old September 11th, 2004, 11:15 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You can't. The .NET message box is a function the runtime code, which in the case of an ASP.NET application is running on the server, not the client. You need to use client side script. Search the ASP.NET categories for the "alert()" client side javascript function.
 
Old September 13th, 2004, 01:17 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

Hope this will help you...

In your aspx page copy and paste this just after your form close tag (viz. after "</form>")

<script language="javascript">
    <asp:Literal Runat="server" ID="ltScript"></asp:Literal>
</script>


In your code copy and paste the following.

Literal ltScript = (Literal) Page.FindControl("ltScript");
ltScript.Text = "alert ('hello')";

Regards
Ganesh

 
Old September 14th, 2004, 02:17 AM
Authorized User
 
Join Date: Feb 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mahulda
Default

This Code can help if you are using vbScript

Dim scriptString as String = "<script language=JavaScript>alert('Error Message')"
scriptString += "</"
scriptString += "script>"
RegisterClientScriptBlock("clientScript", scriptString)

-.. -..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Msgbox rwalker ASP.NET 1.x and 2.0 Application Design 28 March 20th, 2008 01:23 PM
Msgbox Help darrenb Access VBA 2 June 8th, 2007 12:53 AM
MsgBox prabodh_mishra Pro VB 6 1 December 29th, 2006 11:51 AM
help with Msgbox helmekki Excel VBA 2 June 25th, 2004 08:24 AM
msgbox bph Access VBA 2 February 6th, 2004 03:00 PM





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