Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3492768
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:47:58+00:00 2026-05-18T11:47:58+00:00

This might be a ridiculously easy question, but it has me stumped. I have

  • 0

This might be a ridiculously easy question, but it has me stumped. I have a web form where I’m trying to create a hyperlink in the code behind to a file server share, e.g. file://myServer/Shared/, but when the page is rendered, the link doesn’t include the server name, i.e. file:///Shared/. I don’t know why this happens. Any help or insight is appreciated.

UPDATE:

Sure, here is the snippet where the link is being set.

    //The link is embedded in a table
    HyperLink link = (HyperLink)e.Row.Cells[1].Controls[0];
    link.NavigateUrl = @"file://myServer/Shared/";

As a test, I assigned the link to a string value and the link prints the expected url.

string foo = link.NavigateUrl;

//Displays this
"file://myServer/Shared/"

I don’t know why this doesn’t appear when the link is rendered in the final page.

UPDATE 2:

Ok, so I know I have to set the absolute path in the code-behind, I thought that’s what I was doing, but it still won’t render correctly.

UPDATE 3:

I followed pjacobs suggestion about setting the test property and it was actually a step in the right direction. I have the following:

link.Text = "<a href=\"file:\\myServer\\Shared\">link text</a>";

Now the link gets rendered as follows: file:///myServer/Shared. I’m almost there except it gives the extra ‘/’ in front of the server name. I’ll keep playing with it, this seems like it should be so simple, I don’t understand why ASP.Net renders the URL differently.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:47:58+00:00Added an answer on May 18, 2026 at 11:47 am

    You have to set the Text property of the HyperLink… link.Text = “whatever”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be ridiculously easy for you but I've been struggling with this for
This might seem ridiculously simple, but I've been getting all kinds of error depending
I have a table which is full of arbitrarily formatted phone numbers, like this
PCRE: /\A[A-Z0-9_\.%\+\-]+@(?:[A-Z0-9\-]+\.)+(?:[a-z]{2,4}|museum|travel)\z/i POSIX: /^[A-Z0-9_\.%\+\-]+@(?:[A-Z0-9\-]+\.)+(?:[A-Z]{2,4}|museum|travel)$/i This regex is correct in every way for my needs
I have a small script that I am try to port to work for
I am currently trying to implement an algorithm to select a unique (16-bit) identifier.
resizing a camera UIImage returned by the UIImagePickerController takes a ridiculously long time if
It seems that log4j has some class loading issues (among others) and it seems
I am working on a content management application in which the data being stored
Can anyone point me to a library or module with a decent integer relation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.