This is a migrated thread and some comments may be shown as answers.
Target = _blank not working
3 Answers 66 Views
This is a migrated thread and some comments may be shown as answers.
David Penny
Top achievements
Rank 2
David Penny asked on 16 Mar 2012, 05:08 PM
Why does the following not open the webpage in a new window, as expected?

<telerik:RadButton ID="RadButton15" runat="server" 
    PostBackUrl="~/CostDashboard.aspx" Skin="Default" Target="_blank" 
    Text="Costing" Visible="True" Width="200px" ButtonType="LinkButton">
</telerik:RadButton>

David Penny

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 19 Mar 2012, 08:03 AM
Hello David,

I could run your code and was able to get the webpage loaded in a new window. I did try it on FF, Chrome & IE versions, and this was working as expected. Can you get me the exact scenario, so that I could find out more? Which browser are you using?

Regards,
Shinu.
0
David Penny
Top achievements
Rank 2
answered on 19 Mar 2012, 09:55 AM
Hi Shinu,

I'm running it from Visual Studio, and the browser is IE8. Strange, because I expected it to work as well.

I'll go back and take another look. Might be something else is off somewhere.

Dave
0
Slav
Telerik team
answered on 20 Mar 2012, 01:14 PM
Hi David,

Note that setting the PostBackUrl property of RadButton will result in a post to the specified page. If you want to use the button control as a link in order to open a page in a new window/tab, you should set the NavigateUrl property with the path to the page that should be displayed, as shown below:
<telerik:RadButton ID="RadButton15" runat="server" NavigateUrl="~/CostDashboard.aspx"
    Skin="Default" Target="_blank" Text="Costing" Visible="True" Width="200px" ButtonType="LinkButton">
</telerik:RadButton>

I hope this helps. Please let us know if you run into more difficulties.

Kind regards,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
David Penny
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 1
David Penny
Top achievements
Rank 2
Slav
Telerik team
Share this question
or