I am Using Asp.Net MVC. I need use a link to open network drive path as well as normal url (html file path).
I have tried by using
" <a href="path" ></a> " but not working.
Please help me.
Related
We have SharePoint 2013 with Reporting Service add on.
We have ERP that can run SSRS reports in an IFRAME.
The ERP dns is ERP.OURDOMAIN.COM and SharePoint is SP.OURDOMAIN.COM
I have reports that has Go To URL Action to ERP.
Problem is that we need to open the link in a new window or into the IFRAME.
This would work with TARGET=_BLANK or eg. TARGET=_erpIFrame.
The problem is that for some reason SSRS adds TARGET="_TOP" to the Go To URL.
I tried to use javascript to open the link eg.
javascript:void(window.open('http://erp.ourdomain.com/default.aspx?ProjectCode=12345','_blank'))
The link works fine when I run it directly from the SharePoint 2013 report library.
But when report runs inside IFRAME in ERP server the link does not work at all.
When I click on the link nothing happens.
I do not know if it is the IFRAME and domain names that causes some IE11 security blocking. Or the fact that the link in HTML source looks like :
<a tabindex="1" class="A45592b6319f04852ae690abb779bfb4393a" href="javascript:void(window.open('http://erp.ourdomain.com/default.aspx?ProjectCode=12345','_blank'))" target="_top">12345</a>
Note that the last target="_top" is added by SSRS and I can not find any way to tell SSRS not to add it.
If I use a normal link http://erp.ourdomain.com/default.aspx?ProjectCode=12345 the link opens in _TOP and removes ERP navigation.
I also have tried adding target='_blank' in the report URL eg.
http://sp.ourdomain.com/_layouts/ReportServer/RSViewerPage.aspx?rc:LinkTarget=_blank&rv:RelativeReportUrl=/Reports/report.rdl
Or
http://sp.ourdomain.com/_layouts/ReportServer/RSViewerPage.aspx?rv:RelativeReportUrl=/Reports/report.rdl&rc:LinkTarget=_blank
But when I check the HTML source code on the report the link always has target="_top"
So the rc:LinkTarget has no effect.
Please help, is there no way to get this to work?
I got the rc:LinkTarget= working. It does not work after the report url if opened from sharepoint. But it does work if I use the reportserver URL.
I am using asp.net mvc 4.0 application.
I am using II7/II8.
I have configured my web application under following way in IIS in following way
Default Web Site\MyWebApp
When I am trying to browser my page in local machine
http://localhost/Home in that following image is rendered. This image is surely available at /Content/Images/ but not loaded properly, when in browser I do inspect element and alter the path like /MyWebApp/Content/Images/ it is loading an image properly.
<img alt="close" style="cursor: pointer;" src="/Content/Images/ic-delete.png" onclick="closePopUp('dvclose');">
While in live server IIS , I have website like www.xxx.yzx and when I am trying to browse
www.xxx.yzx/home it is loading image properly
i am trying to do somthing so I don't want to bother to change path(remove MyWebApp) of image when I am deplying. I don't want to move my application from Default We Site
What to do for loading image in local machine?
Posting my comment as the answer:
~/Content/Images/ic-delete.png Try that as the src.
I deployed asp.net mvc 4 application on windows 2012 server today. Everything is working fine but no png images are loading.
The below are the screenshots
These are some things I checked
I can load different images in this folder except the ".png"s.
Static Content was installed on my webserver.
Check MIME types .. png are included there
Added the following code to route config
routes.IgnoreRoute("{resource}.png")
Also checked the advanced Attributes by going into the properties of the file on webserver. The below is the screenshot.
Try use this:
<img src="<%= Url.Content("~/Content/logo.png")%>" alt=""/>
I've an ASP.Net MVC website which manage some business logic for an entreprise.
For one task, I've to make them edit a file(photoshop file). They have a samba access to it.
How can I make them OPEN this file(and not download a copy and work on the copy)? I need them to edit this file and save their changes directly in the original. And I need that it opens the file with the program associated with this file.
It's for a small group of administrators, so it's not a big deal if I need to put the website that generate those pages in trusted website or something like this.
I tried to put a <a href="file://D:\test.txt"/>test</a> but it doesn't seems to work.
How to do this? Is there a special way to generate this in asp.net?
I'm open to all suggestion.
It has to work at least with safari/mac, windows and other browser are bonus
EDIT
I made it works on IE(Security settings + indicating a network path), but most users which will use this will be on safari/firefox :/ any idea?
EDIT: What about putting an url like: myProtocol://someParametersForMyFile and having an application on the client machine able to load myProtocl links? Something like magnet links
Does anybody knows how it is called? I found this: http://www.macosxautomation.com/applescript/linktrigger/index.html But I'm not sure it can't open a any file
Try <a href="file:///D:/test.txt"/>test</a> for a local file. For a share on a remote machine use <a href="file://MyServerName/MyShareName/test.txt"/>test</a>.
I ended doing an applescript, which is capable of handle custom URL, then the applescript read the parameter in the url and does the appropriate copy.
Source: http://applescript.tv/linktrigger/
I using urlrewriter.net to implement friendly urls.
When I did the rewriting I used subfolders on occasions.
I found myself having problems with images and links and the ~ sign wasn't working for me. After reading a bit I found out that I'm not the only one with that problem and they recommended using full path "www.website.com/images/x.jpg" etc.
Now, I can't develop and QA because all of the links go to my real online website.
What can I do?
If the URL prefix is your only concern, have you thought about adding a key to your web.config for the URL prefix and then dynamically generate the path to your images that way?
By doing this you can easily migrate all the code up to production when finished, and then simply update the web.config to point everything to the proper server.
~ only works with ASP.NET Web Controls, not standard HTML controls.
A similar problem is when you have content pages (located in subfolders) referencing a masterpage in the application root. You need to use Image and Hyperlink controls in the MasterPage since the files are referenced from the location of the content page.
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/Test.png" AlternateText="" />
<asp:HyperLink ID="HyperLink1" runat="server"NavigateUrl="~/Test.aspx">HyperLink</asp:HyperLink>