Set target on ASP.NET button component.
Posted on 2010-09-16
I have an ASP.NET Link button which I am using to redirect a user to another page. The link button is located within an IFRAME so I set the target to '_parent' in order for the redirect to affect the overall webpage. This all works fine, however the styling of the link button is causing an issue and it is preferred that the Link Button is replaced with a standard button. I have replaced the component and am using the PostBackUrl attribute to define the redirect path BUT the problem comes with making the ASP.NET button redirect the entire page and not just the iframe contents. Anyone know how I can cause a Button to redirect an entire page rather than just the iframe that contains it - in the same way as declaring the target attribute with a Link Button.