Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 6th, 2008, 08:41 AM
Registered User
 
Join Date: Oct 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Opening a text file using hyperlink in a gridview

Hello,
In my webapplication I have a gridview. When users serch, their results are displayed in that gridview. Now I want to open that file, appeared as a hyperlink.
I have written following code-

 <Columns>
    <asp:BoundField DataField="file_name" HeaderText="File Name"/>

    <asp:TemplateField HeaderText="Open">

    <ItemTemplate>
    <asp:HyperLink ID="Open" NavigateUrl='<%# Eval("file_name") %>' Text='<%# Eval("file_name") %>' runat="server" />
    </ItemTemplate>
    </asp:TemplateField>

</Columns>

I want to open this text file on a different webpage. I am not geeting how do I do this? When I place my mouse on the link it says-
http://localhost:2222/file1.txt, but does not open up.
This code is running on my m/c and file is on m/c too. but eventually the file will be on the server. Also, the link does not have a full path (c:\folder1\file1.txt). I want to append C:\folder1\ prior to the file1.txt.
How do I do this?
Please help.


 
Old March 6th, 2009, 02:03 AM
Registered User
 
Join Date: Feb 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Gridview

Hi friends,
I have dropdownlistbox within the Gridview.It should display result according to the particular data what i select.
Thanks in advance.
by
kavitha





Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a file using hyperlink absu ASP.NET 1.0 and 1.1 Basics 4 October 8th, 2008 09:24 AM
GridView Hyperlink ki_ki ASP.NET 2.0 Professional 25 March 8th, 2007 03:30 PM
Using Hyperlink field in GridView asp_convert ASP.NET 2.0 Basics 2 February 7th, 2007 07:33 PM
Opening Text file in Binary mode for reading lawsoncobol Access VBA 1 August 3rd, 2006 04:01 AM
Opening a new window from a hyperlink in an ItemTe acorbo ASP.NET 1.0 and 1.1 Professional 4 October 19th, 2004 01:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.