Last post Mar 25, 2018 02:15 PM by GK70
Mar 24, 2018 02:51 PM|GK70|LINK
Using VB.net Application
I have an application which create files (pdf reports/text file) and write it on to server and immediately opens up the pdf in a new window and the parent window display the list of reports. (newly created file will be added to the list). Earlier use to
write the file to webserver and access it from the webserver using the service account.
Now we are writing the files to the File server. So End users does not have access to the File server. The application should use the service account to read and write. No issues when writing but when I load the file it is an issue when I use the file server
location. Display page can be displayed.
Sample of code:
url = (pdfload.aspx?docname=XXXx)
2. In the load of new page have this logic
Path = "////location//pdf//filename.pdf
Sending the url (Server.MapPath("~" + path) to the open.window(url) .
When it renders to browser it shows //location/pdf/filename.pdf
Help will be greatly appreciated.
Mar 24, 2018 06:10 PM|DA924|LINK
You may not find a VB.NET example.
Mar 24, 2018 07:52 PM|GK70|LINK
Thank you for your response. How to open the document it in a different window?
Mar 24, 2018 08:29 PM|DA924|LINK
Mar 24, 2018 10:33 PM|GK70|LINK
Thank you again. Somehow I am not able integrate both. I am able to load the document using the for link. If I call any java script after that it is not executes.
Trying to call the following line after document is loaded.
Mar 24, 2018 10:49 PM|DA924|LINK
Mar 25, 2018 12:17 AM|GK70|LINK
I have already tried that. It did not help.
Mar 25, 2018 03:24 AM|DA924|LINK
Mar 25, 2018 04:23 AM|cnranasinghe|LINK
Did you try below,
<asp:HyperLink ID="HyperLink1" NavigateUrl="~/filename.pdf" Target="_blank" runat="server">HyperLink</asp:HyperLink>
Mar 25, 2018 02:13 PM|GK70|LINK
Tried this and it worked.
Created the new window with the url first and then closed the current window.
Mar 25, 2018 02:15 PM|GK70|LINK
Thank you for you reply. It worked from below option.