Open a New Browser Window From an ASP.Net Server Control
All ASP.Net controls add functionality to your web application by performing postbacks to the server. When they post back, their events are captured by the web server. So if you add an onclick event to a button, it will be a server-side event. But what if you need a button to open a window or JavaScript prompt when you click on it? This is a client-side event, and there's no way to add this property to an ASP.Net server control it would seem. Here's the code to allow you to do it programmatically. (more…)
