RadControls version: v.2010.3.1109.35
|.NET version: Any
|Visual Studio version: Any
|programming language: Any
all browsers supported by RadControls
The new RadButton is really cool and highly configurable. One of the ButtonTypes available is the LinkButton. I'm using several of the new buttons on a site and I need one to open a link in a new browser window with a custom size. Note that if you don't care about the size of the new window, you can just set the Target = "_blank". This project shows how to open a new browser window with custom features.
- Set the ButtonType to LinkButton.
- Set the NavigateUrl to the desired URL.
The .aspx Markup:
"Open in New Window"
- Pass the desired URL and your custom requirements to the window.open function. The NavigateUrl value is available as "sender._navigateUrl".
- Cancel the click event. If you don't cancel the event the main window will navigate to the new URL too. "return false" works with IE, but args.set_cancel(true) works with all supported browsers.
Pretty simple. But it took me a while to figure out all the details, so hopefully this will help speed someone else's development!