Well, I have a folder called GUI. Inside GUI thers another folder called PDF and inside this folder, there are some PDF files. This folder (GUI) is uploaded to the server too.
Then I have a WebForm with some ImageButtons. When I click one of these ImageButtons, I want the file to open in a new tab. I tried with the following code:
private void LnkRelease_Click(object sender, EventArgs e)
if ((((System.Web.UI.WebControls.WebControl)(sender))).ToolTip != "")
string virtualFolder = @"~\GUI\";
string physicalFolder = Server.MapPath(virtualFolder);
string virtualPath = physicalFolder + "PDF" + @"\" + ((System.Web.UI.WebControls.WebControl)(sender)).ToolTip;
Console.WriteLine("The URL is broken");
catch (Exception ex)
As you can see, I build the path using the tooltips of the different ImageButtons. The ToolTip = File Name I want to open.
When I try this in debug mode, it works. It opens the pdf file in a new tab. However when I
View Complete Post