Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
ASM
Dear All,

We need to open a pop up window in an anchor tag in code behind.

The code is attached below.Its not working.We need to open the window as a pop up same like GMAIL Chat Window.

sb.Append(userIcon + "
" + loggedInUser.User.Username + "
" + " " + userOnlineStatusIcon + "
");

Please help.

Regards
Sreejith
Posted
Comments
OriginalGriff 7-Sep-15 10:11am    
And?
What have you tried?
Where are you stuck?
What help do you need?

Because that code has nothing to do with pop-ups (and is a criminal waste of a string builder as well...)

1 solution

First of all, your code sample does not show any attempt to open a pop-up window, so it's hard to say if you have some bug.

Anyway, pop-up windows are pretty bad and should be avoided in most cases. They irritate many users, are intrusive (the user knows better what page to open in what window or tab, or just replace a current window content) and are often blocked in the browsers, using the browsers' options/plug-ins.

One good substitute for this questionable technique is simulation of modal behavior on the same page, as with jQuery dialog: https://jqueryui.com/dialog[^].

You can also find many 3rd-party plug-ins, collectively known as "modal popup", featuring different effects, such as transitions, and, notably, dimming of the rest of the window.

—SA
 
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