Datagrid broken link

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mel

    Datagrid broken link

    I have a datagrid control that has one column displaying a filename.
    When the link is clicked it opens the file. How do I open a file that
    resides on a remote server? The code below does not work. When I
    click the link I get error #404 Page Not Found. PLEASE HELP!

    'start of example code. The FullName = "\\SalesServer\ Quotes
    \123456\<file name>"
    <asp:DataGrid runat="server" id="dgQuote" Font-Names="Verdana"
    AutoGenerateCol umns="False" AlternatingItem Style-
    BackColor="#eee eee"
    HeaderStyle-BackColor="Navy " HeaderStyle-ForeColor="Whit e"
    HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True"
    AllowPaging="Tr ue" AllowSorting="T rue" Font-Size="Small"
    CellPadding="2" >
    <Columns>
    <asp:HyperLinkC olumn DataNavigateUrl Field="FullName "
    DataTextField=" Name"
    HeaderText="Fil e Name" />
    </Columns>
    <SelectedItemSt yle BackColor="#C5B BAF" />
    <PagerStyle HorizontalAlign ="Center" />
    <AlternatingIte mStyle BackColor="#E3E AEB" />
    <HeaderStyle BackColor="#1C5 E55" Font-Size="Small"
    ForeColor="Whit e" Font-Bold="True" />
    </asp:DataGrid>
    'end of example code
  • Mel

    #2
    Re: Datagrid broken link

    On Apr 11, 1:38 pm, Mel <MLights...@gma il.comwrote:
    I have a datagrid control that has one column displaying a filename.
    When the link is clicked it opens the file. How do I open a file that
    resides on a remote server? The code below does not work. When I
    click the link I get error #404 Page Not Found. PLEASE HELP!
    >
    'start of example code. The FullName = "\\SalesServer\ Quotes
    \123456\<file name>"
    <asp:DataGrid runat="server" id="dgQuote" Font-Names="Verdana"
    AutoGenerateCol umns="False" AlternatingItem Style-
    BackColor="#eee eee"
    HeaderStyle-BackColor="Navy " HeaderStyle-ForeColor="Whit e"
    HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True"
    AllowPaging="Tr ue" AllowSorting="T rue" Font-Size="Small"
    CellPadding="2" >
    <Columns>
    <asp:HyperLinkC olumn DataNavigateUrl Field="FullName "
    DataTextField=" Name"
    HeaderText="Fil e Name" />
    </Columns>
    <SelectedItemSt yle BackColor="#C5B BAF" />
    <PagerStyle HorizontalAlign ="Center" />
    <AlternatingIte mStyle BackColor="#E3E AEB" />
    <HeaderStyle BackColor="#1C5 E55" Font-Size="Small"
    ForeColor="Whit e" Font-Bold="True" />
    </asp:DataGrid>
    'end of example code
    I should have said "How do I open a file that resides on a DIFFERENT
    server" meaning the server is on site; NOT a remote server which
    implies off site.

    Comment

    • Theo

      #3
      Re: Datagrid broken link

      On Apr 11, 2:38 pm, Mel <MLights...@gma il.comwrote:
      I have a datagrid control that has one column displaying a filename.
      When the link is clicked it opens the file. How do I open a file that
      resides on a remote server? The code below does not work. When I
      click the link I get error #404 Page Not Found. PLEASE HELP!
      >
      'start of example code. The FullName = "\\SalesServer\ Quotes
      \123456\<file name>"
      <asp:DataGrid runat="server" id="dgQuote" Font-Names="Verdana"
      AutoGenerateCol umns="False" AlternatingItem Style-
      BackColor="#eee eee"
      HeaderStyle-BackColor="Navy " HeaderStyle-ForeColor="Whit e"
      HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True"
      AllowPaging="Tr ue" AllowSorting="T rue" Font-Size="Small"
      CellPadding="2" >
      <Columns>
      <asp:HyperLinkC olumn DataNavigateUrl Field="FullName "
      DataTextField=" Name"
      HeaderText="Fil e Name" />
      </Columns>
      <SelectedItemSt yle BackColor="#C5B BAF" />
      <PagerStyle HorizontalAlign ="Center" />
      <AlternatingIte mStyle BackColor="#E3E AEB" />
      <HeaderStyle BackColor="#1C5 E55" Font-Size="Small"
      ForeColor="Whit e" Font-Bold="True" />
      </asp:DataGrid>
      'end of example code
      You need to convert the file name into something that the browser can
      resolve. That could mean converting the UNC path to a URL, or having
      a page in your site that does nothing but fetch and pass on files from
      a specified location.

      Comment

      • Mel

        #4
        Re: Datagrid broken link

        On Apr 12, 7:17 pm, Theo <theo.brink...@ gmail.comwrote:
        On Apr 11, 2:38 pm, Mel <MLights...@gma il.comwrote:
        >
        >
        >
        I have a datagrid control that has one column displaying a filename.
        When the link is clicked it opens the file. How do I open a file that
        resides on a remote server? The code below does not work. When I
        click the link I get error #404 Page Not Found. PLEASE HELP!
        >
        'start of example code. The FullName = "\\SalesServer\ Quotes
        \123456\<file name>"
        <asp:DataGrid runat="server" id="dgQuote" Font-Names="Verdana"
        AutoGenerateCol umns="False" AlternatingItem Style-
        BackColor="#eee eee"
        HeaderStyle-BackColor="Navy " HeaderStyle-ForeColor="Whit e"
        HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True"
        AllowPaging="Tr ue" AllowSorting="T rue" Font-Size="Small"
        CellPadding="2" >
        <Columns>
        <asp:HyperLinkC olumn DataNavigateUrl Field="FullName "
        DataTextField=" Name"
        HeaderText="Fil e Name" />
        </Columns>
        <SelectedItemSt yle BackColor="#C5B BAF" />
        <PagerStyle HorizontalAlign ="Center" />
        <AlternatingIte mStyle BackColor="#E3E AEB" />
        <HeaderStyle BackColor="#1C5 E55" Font-Size="Small"
        ForeColor="Whit e" Font-Bold="True" />
        </asp:DataGrid>
        'end of example code
        >
        You need to convert the file name into something that the browser can
        resolve. That could mean converting the UNC path to a URL, or having
        a page in your site that does nothing but fetch and pass on files from
        a specified location.
        Could you provide an example?

        Comment

        • Mel

          #5
          Re: Datagrid broken link

          On Apr 14, 7:53 am, Mel <MLights...@gma il.comwrote:
          On Apr 12, 7:17 pm, Theo <theo.brink...@ gmail.comwrote:
          >
          >
          >
          On Apr 11, 2:38 pm, Mel <MLights...@gma il.comwrote:
          >
          I have a datagrid control that has one column displaying a filename.
          When the link is clicked it opens the file. How do I open a file that
          resides on a remote server? The code below does not work. When I
          click the link I get error #404 Page Not Found. PLEASE HELP!
          >
          'start of example code. The FullName = "\\SalesServer\ Quotes
          \123456\<file name>"
          <asp:DataGrid runat="server" id="dgQuote" Font-Names="Verdana"
          AutoGenerateCol umns="False" AlternatingItem Style-
          BackColor="#eee eee"
          HeaderStyle-BackColor="Navy " HeaderStyle-ForeColor="Whit e"
          HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True"
          AllowPaging="Tr ue" AllowSorting="T rue" Font-Size="Small"
          CellPadding="2" >
          <Columns>
          <asp:HyperLinkC olumn DataNavigateUrl Field="FullName "
          DataTextField=" Name"
          HeaderText="Fil e Name" />
          </Columns>
          <SelectedItemSt yle BackColor="#C5B BAF" />
          <PagerStyle HorizontalAlign ="Center" />
          <AlternatingIte mStyle BackColor="#E3E AEB" />
          <HeaderStyle BackColor="#1C5 E55" Font-Size="Small"
          ForeColor="Whit e" Font-Bold="True" />
          </asp:DataGrid>
          'end of example code
          >
          You need to convert the file name into something that the browser can
          resolve. That could mean converting the UNC path to a URL, or having
          a page in your site that does nothing but fetch and pass on files from
          a specified location.
          >
          Could you provide an example?

          Comment

          Working...