Is it possible to open a page in new tab from code behind?
Asked
Active
Viewed 4,019 times
0
-
Please check this url:http://stackoverflow.com/questions/5530274/asp-net-open-new-tab-in-browser-from-codebehind – Sarang Feb 27 '13 at 12:37
-
this solution set sth for ClientClick but i want to write code in method and call it – SajjadZare Feb 27 '13 at 12:43
-
This is what you after [target Attribute](http://www.w3schools.com/tags/att_a_target.asp) – huMpty duMpty Feb 27 '13 at 13:04
-
I wan to write it in code behind not use for an html or asp control – SajjadZare Feb 27 '13 at 13:20
2 Answers
0
You can try this
Response.Write '<script type="text/javascript"> window.open(url);
or take a look at jems answer
or you can use window.open command

Community
- 1
- 1

syed mohsin
- 2,948
- 2
- 23
- 47
-
the first one, jems answer set url for OnClientClick but i want to use it in a function and call it when i need – SajjadZare Feb 27 '13 at 12:51