openenig document in different window
-
Hi All I am developing the Search Engine that is working properly and returning the path of files(store in directory at server ) . Now i want to display FileName as url and whenever userclick that url the Document/file should be open in new window . Which control should i use for hyperlink ? HyperLink, LinkButton or simple tag Can any one tell me how to open a document in different window ?
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hi All I am developing the Search Engine that is working properly and returning the path of files(store in directory at server ) . Now i want to display FileName as url and whenever userclick that url the Document/file should be open in new window . Which control should i use for hyperlink ? HyperLink, LinkButton or simple tag Can any one tell me how to open a document in different window ?
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
Hi, You can use and set its Target property to "_blank" and its NavigateUrl property to the file url and done!!!!!!!!!!!!!!!!!. I hope this will help you. -- modified at 6:56 Friday 8th June, 2007 Thanks and Regards, Chetan Ranpariya
-
Hi All I am developing the Search Engine that is working properly and returning the path of files(store in directory at server ) . Now i want to display FileName as url and whenever userclick that url the Document/file should be open in new window . Which control should i use for hyperlink ? HyperLink, LinkButton or simple tag Can any one tell me how to open a document in different window ?
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hi All I am developing the Search Engine that is working properly and returning the path of files(store in directory at server ) . Now i want to display FileName as url and whenever userclick that url the Document/file should be open in new window . Which control should i use for hyperlink ? HyperLink, LinkButton or simple tag Can any one tell me how to open a document in different window ?
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
Are you trying to do this after a postback or from a regular link? Regular link: The Code Project Code Behind: You'll need to register a client startup script to open the new window once the page has loaded:
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Page.ClientScript.RegisterStartupScript(Me.GetType, "codeProjectRedirect", "window.open('http://www.codeproject.com')", True) End Sub `Hope this helps Tom -- modified at 13:41 Friday 8th June, 2007`
-
Are you trying to do this after a postback or from a regular link? Regular link: The Code Project Code Behind: You'll need to register a client startup script to open the new window once the page has loaded:
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Page.ClientScript.RegisterStartupScript(Me.GetType, "codeProjectRedirect", "window.open('http://www.codeproject.com')", True) End Sub `Hope this helps Tom -- modified at 13:41 Friday 8th June, 2007`
Tom John wrote:
client startup script to open the new window once the page has loaded:
How will it open if have only path of directory such as C://Albums/FilaName.txt store at the server side Its not a website page i think its bit clear now
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Hi, You can use and set its Target property to "_blank" and its NavigateUrl property to the file url and done!!!!!!!!!!!!!!!!!. I hope this will help you. -- modified at 6:56 Friday 8th June, 2007 Thanks and Regards, Chetan Ranpariya
Chetan Ranpariya wrote:
Target property to "_blank" and its NavigateUrl property
Are you suggesting HyperLink Control ?
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
Chetan Ranpariya wrote:
Target property to "_blank" and its NavigateUrl property
Are you suggesting HyperLink Control ?
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
Hi, You r right. I m suggesting you to use hyperlink control.
Thanks and Regards, Chetan Ranpariya
-
Tom John wrote:
client startup script to open the new window once the page has loaded:
How will it open if have only path of directory such as C://Albums/FilaName.txt store at the server side Its not a website page i think its bit clear now
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
Sandeep Akhare wrote:
How will it open if have only path of directory such as C://Albums/FilaName.txt store at the server side Its not a website page
It depends on the MIME type man... Text files normally open directly into the IE.
Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group | Blog Spot
-
Sandeep Akhare wrote:
How will it open if have only path of directory such as C://Albums/FilaName.txt store at the server side Its not a website page
It depends on the MIME type man... Text files normally open directly into the IE.
Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group | Blog Spot
Yes but the problem is that the its a web application and client will not be able to open a file untill it is in Virtual directory or it is in current application folder .......... Link having url of any file in server will not open in this way
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "