Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
how to create a dilogue box in ASP.Net, EX:If i click a button One POP Window Show the message.("Successfully Login")
Posted
Comments
Wild-Programmer 12-Mar-11 2:43am    
Did you try javascript alert() or window.open()?

Try this article from Code Project
A Custom Dialog Box Control[^]
 
Share this answer
 
@Kumrvits

First of all your question is a bit unclear,

What do you want to do?

There are Three ways. if successfully logins

1) show an alert dialog box of javascript.
2) Show a popup window which can also be done through javascript.
3) using the below code you can show a dialog

Response.Write("<script type='text/javascript'>alert('Sucessfully login')</script>");
       Response.Flush();


C# also provides to register client side script.

Page.ClientScript.RegisterStartupScript()

For this the below link will help you.


DevCurry.com


Hope you have got the answer
 
Share this answer
 
v2
Just a word of warning for you. Pop-ups are irritating, and especially irritating because they are associated with unwanted add. Many users choose to block pop-ups using their Web browser features/plug-ins.
You can develop some alternative presentation for messages. It can be based on some HTML element (typically div) which is normally invisible, so you can control visibility by your events.

—SA
 
Share this answer
 
Comments
_Ashish 14-Mar-11 14:03pm    
yes very true it real-time application it should be avoided and you are not always sure that are they actually being seen by the end-uesrs.

my 5
Sergey Alexandrovich Kryukov 14-Mar-11 18:29pm    
Thank you. (It's not a real-time application in any sense, but the reason you explain is valid.)
--SA
kumarvits2 15-Mar-11 0:06am    
Thank you for your valuable suggetion...........
Go there-[ASP.NET Popup Control][^] to read a highly voted article to learn how to create pop-window.
this link[^] also might help you.
 
Share this answer
 
you can use a DIV which it's display attribute set to none, when you click the button set it's display to Block.
 
Share this answer
 
In Microsoft Visual Web Developer,Paste the following code

C#
ScriptManager.RegisterClientScriptBlock(this,typeof(Page), "Message", "alert('Sucessfully Login')", true);
 
Share this answer
 
v3
in your button event you will get OnClintClick.

just write code like this OnClientClick=OnClientClick="alert('Your message')"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900