By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,069 Members | 1,337 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,069 IT Pros & Developers. It's quick & easy.

Message box

P: n/a
All,

I have a C# ASP.Net and would like to know how I can display a message box
or another stripped down modal internet explorer window.

Thanks
Msuk
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Msuk,

You would have to do this through client side scripting code.
Basically, a call to the alert method on the window class provided in the
browser. You will have to register your script on the server side to act in
response to a user action (or the document loading), though.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:F7**********************************@microsof t.com...
All,

I have a C# ASP.Net and would like to know how I can display a message box
or another stripped down modal internet explorer window.

Thanks
Msuk

Nov 16 '05 #2

P: n/a
Hi,

Thanks do you have a example please?

Thanks
Msuk

"Nicholas Paldino [.NET/C# MVP]" wrote:
Msuk,

You would have to do this through client side scripting code.
Basically, a call to the alert method on the window class provided in the
browser. You will have to register your script on the server side to act in
response to a user action (or the document loading), though.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:F7**********************************@microsof t.com...
All,

I have a C# ASP.Net and would like to know how I can display a message box
or another stripped down modal internet explorer window.

Thanks
Msuk


Nov 16 '05 #3

P: n/a
use this:

RegisterStartupScript( "Script", "<SCRIPT>alert('Error, you have ....
');</SCRIPT>" ); // just has an ok button..

or this

RegisterStartupScript( "Script", "<SCRIPT>return confirm('Would you like
to ...?');</SCRIPT>" ); // has a yes/no option

but with a modal that you've created...

RegisterStartupScript( "Script",
"<SCRIPT>showModal('<pagename.aspx>');</SCRIPT>" ); // your aspx page.
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
Hi,

Thanks do you have a example please?

Thanks
Msuk

"Nicholas Paldino [.NET/C# MVP]" wrote:
Msuk,

You would have to do this through client side scripting code.
Basically, a call to the alert method on the window class provided in the
browser. You will have to register your script on the server side to act
in
response to a user action (or the document loading), though.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:F7**********************************@microsof t.com...
> All,
>
> I have a C# ASP.Net and would like to know how I can display a message
> box
> or another stripped down modal internet explorer window.
>
> Thanks
> Msuk


Nov 16 '05 #4

P: n/a
msuk,

You have to place the code in the HTML portion of the ASPX page. Either
that, or call the RegisterClientScriptBlock method on the Page class.
However, in .NET 2.0, this method is marked as obsolete. Rather, you will
have to call methods on the ClientScriptManager instance exposed by the
ClientScript property on the Page class.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.com...
Hi,

Thanks do you have a example please?

Thanks
Msuk

"Nicholas Paldino [.NET/C# MVP]" wrote:
Msuk,

You would have to do this through client side scripting code.
Basically, a call to the alert method on the window class provided in the
browser. You will have to register your script on the server side to act
in
response to a user action (or the document loading), though.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:F7**********************************@microsof t.com...
> All,
>
> I have a C# ASP.Net and would like to know how I can display a message
> box
> or another stripped down modal internet explorer window.
>
> Thanks
> Msuk


Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.