473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

How can I display a MessageBox in ASP.NET?

Hi,

I need to display a messagebox in ASP.NET that includes a textbox for
input. There must be an easy way to do this!

Thanks
Steve

May 26 '06 #1
5 1287
this is known as a popup in the html world. current browser security
requires this to be done from client script in response to click event.

<a href="javascript:window.open('mypopup.aspx');">cli ck here</a>

to move data from the popup to the main window also requires javascript. you
should buy a book on javascript programing if this is the direction you want
to go.

-- bruce (sqlwork.com)

"Steve Kershaw" <st***********@yahoo.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Hi,

I need to display a messagebox in ASP.NET that includes a textbox for
input. There must be an easy way to do this!

Thanks
Steve

May 26 '06 #2
Standard message box in a webbrowser is a javascript alert, standard
inputbox is a javascript prompt. So you need a javascript function to do it
which you can output.

<SCRIPT language="JavaScript">
<!--hide
var yourname= prompt('Please enter your name, so you can get a special
greeting', ' ');

if ( (yourname==' ') || (yourname==null) )
{
yourname="Dude";
}

//-->
</SCRIPT>
Take a look here to see how to implement javascript functions in asp.net
http://steveorr.net/articles/ClientSideSuite.aspx

--
Regards

John Timney
Microsoft MVP

"Steve Kershaw" <st***********@yahoo.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Hi,

I need to display a messagebox in ASP.NET that includes a textbox for
input. There must be an easy way to do this!

Thanks
Steve

May 26 '06 #3

Thanks for your quick response.

JavaScript has the problem that it is completely client side and I need
to call a server side method with the user input. I need something like
btnMyButton.Attributes.Add("onclick", "return confirm('Do you really
want to do this?')"); Except the confirm popup dosen't have a textbox
for user input.

May 26 '06 #4

"Steve Kershaw" <st***********@yahoo.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Hi,

I need to display a messagebox in ASP.NET that includes a textbox for
input. There must be an easy way to do this!


Create a new web form that simulates the popup box and display it from your
code. You can use HTML or Javascript to ensure it opens in a new window.
May 26 '06 #5
The JavaScript "Confirm" method should do the trick.

Here are the details, along with some free components that will do it for
you:
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Steve Kershaw" <st***********@yahoo.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Hi,

I need to display a messagebox in ASP.NET that includes a textbox for
input. There must be an easy way to do this!

Thanks
Steve

May 26 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual...
1
by: Kevin R | last post by:
I'm running the HelloWorldForm example from Microsoft to learn how to use ..net. I'm using Microsoft Visual Studio .NET 2003, 1.1 framework. I run the HelloWorldForm example. The example runs...
3
by: sdeyoreo | last post by:
How do I display the integer in pt.x in a message box? I get a error on parameter 2 of MessageBox call: char str; sprintf(str,"point x is %d",pt.x); MessageBox(NULL,str,NULL,MB_OK);
3
by: Tee | last post by:
Hi, I have a boolean variable, I need to see it's true or false from a MessageBox.Show, but when I try to compile, I keep on getting error, "cannot convert from 'bool' to 'string'". This is...
7
by: jez123456 | last post by:
Hi, I have the following method where I need to display which database is being processed, however, the label lblDatabase dosn't seem to work until the end. private void...
18
by: Alpha | last post by:
Hi, I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a listbox that I have binded to a dataset table, "source" which has 3 columns. I would like to display 2 of those...
3
by: Paul Wilson | last post by:
Hi guys, Can someone tell me how i could display a messagebox in ASP.NEt. Following is what i want to do. Validate the user details, & if the user doesn't have requried access rights, then...
2
by: soundar rajan | last post by:
Hi, I wanna display messagebox, and also at the bottom i wanna display "Dont show again" with checkbox using VB.NET. Immediate help needed!!!!
14
by: A.A. Fussy | last post by:
What code would I use for displaying a message box in VB.NET
3
by: Amanda | last post by:
Can anyone help me to display the output in MessageBox for the following program result?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.