Popup dialogs using Webforms

  • Thread starter Thread starter Taurkon
  • Start date Start date
Yes, but I am not using HTML only. Perhaps I should have pointed out that I am using c# (and could be using any .net language).

I was able to attach an alert to a control and write an event that would give me a popup dialog but could not get it to work stand alone.
 
You could be using COBOL.NET for all it matters. HTML is generated nomatter what. As I said before, you cant create dialogs using HTML.
 
btnDoWhatever.Attributes.Add("onclick", "return confirm(this is really a pop up dialog or am I imagining it?);");


I just cant figure out what the heck this is called then when it pops up on my screen. Now if I could only figure out how to make what ever this is called pop up without it being attached to an event.
 
Its called a message box. If you just want it to show when the page loads put that either in a script block thats fired in the bodys onLoad event, or if you want to stick with ASP.NET place that code in the Page_Load event.
 
A few questions now:

1. What is the difference between a pop up dialog and a message box? A message box is what type of form and its properties are what?

2. Let me try to rephrase this questions:

If (a ==b)
DoSomthing
else
show a message box

Is this possible?
 
1. A dialog is programmer developed. Message boxes are windows predefined by the OS.

2. Code is executed server-side, so any user interface element needs to be sent to the browser as HTML. So yes, its very much possible using Response.Write().
 
Well, as someone who has just picked up and used the .net frameworks as of last weekend, and who has no experience using HTML, I would like to thank you so much for you extreme helpfulness in working and having patience with me. Your replies have been very clear and concise, and your ability to determine my actual intention is, I am sure, a valuable asset to your client or company you work for. No wonder you are called the "Exalted One"

Now, I shall try once again determine how to pop up a message box to provide user feedback since it has taken me 2 days to learn that there is absolutely no correlation between a message box and a pop up dialog box.

Regards
The humble peon
 
Back
Top