Equivalent of Javascript Alert(string) method in C# script.

E

Erik Veldkamp

Hi there,

When I use javascript I can call the alert(string) method, to show an alert
window.

How can I do the same when I use C# script?

Thanks for your help
 
A

Anatoly

There is no equivalent for alert(), cause C# is server-side language,
alert() : client-side script
What you can do: write to client alert() script like:

RegisterClientScriptBlock("myAlert", "<script
language='javascript'>alert('Here alert');</script>")
HTH
 
Joined
Jun 18, 2010
Messages
1
Reaction score
0
Well, this has to be said:

ASP is server side scripting,
C# can be used to program Windows (and then clientside) applications.

And yes, you can use this : MessageBox.Show()
To fullfill "Alert" and "Confirm" tasks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top