Click here to Skip to main content
12,503,321 members (66,258 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET C#4.0
how to create a dilogue box in ASP.Net, EX:If i click a button One POP Window Show the message.("Successfully Login")
Posted 11-Mar-11 20:39pm
Comments
Amit Kumar Tiwari 12-Mar-11 2:43am
   
Did you try javascript alert() or window.open()?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Try this article from Code Project
A Custom Dialog Box Control[^]
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

@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
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

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
  Permalink  
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
SAKryukov 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...........
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 5

you can use a DIV which it's display attribute set to none, when you click the button set it's display to Block.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 6

In Microsoft Visual Web Developer,Paste the following code

ScriptManager.RegisterClientScriptBlock(this,typeof(Page), "Message", "alert('Sucessfully Login')", true);
  Permalink  
v3
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 7

in your button event you will get OnClintClick.

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 26 Feb 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100