Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How can I display a MessageBox in ASP.NET?

Reply
Thread Tools

How can I display a MessageBox in ASP.NET?

 
 
Steve Kershaw
Guest
Posts: n/a
 
      05-26-2006
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

 
Reply With Quote
 
 
 
 
bruce barker \(sqlwork.com\)
Guest
Posts: n/a
 
      05-26-2006
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" <> wrote in message
news: 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
>



 
Reply With Quote
 
 
 
 
John Timney \( MVP \)
Guest
Posts: n/a
 
      05-26-2006
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" <> wrote in message
news: 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
>



 
Reply With Quote
 
Steve Kershaw
Guest
Posts: n/a
 
      05-26-2006

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.

 
Reply With Quote
 
Mike Lowery
Guest
Posts: n/a
 
      05-26-2006

"Steve Kershaw" <> wrote in message
news: 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.


 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      05-26-2006
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" <> wrote in message
news: 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Display Confirmation MessageBox, but only if certain data entered in form bay_dar@yahoo.com ASP .Net 0 10-25-2006 03:55 PM
How to display "Dont show again" checkbox in messagebox soundar rajan ASP .Net 2 02-24-2005 12:03 PM
how to display a number in a messagebox? sdeyoreo@hotmail.com C++ 3 01-16-2005 12:37 AM
how to display a MessageBox in ASP.net Paul Wilson ASP .Net 3 06-21-2004 04:40 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57