473,545 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PostBackUrl cannot work for file link.

ABC
I write the code as:
<asp:LinkButt on ID="LinkButton2 " Text='<%# Eval("Title") %>'
PostBackUrl='fi le://<%# Eval("path") %>' runat="server"> </asp:LinkButton>

But It don't work to download or open file when I clicked.

How should I do?
Nov 19 '05 #1
6 6915
What are you trying to do?
Patrick

"ABC" <abc.abc.com> wrote in message
news:Ot******** ******@TK2MSFTN GP12.phx.gbl...
I write the code as:
<asp:LinkButt on ID="LinkButton2 " Text='<%# Eval("Title") %>'
PostBackUrl='fi le://<%# Eval("path") %>' runat="server"> </asp:LinkButton>

But It don't work to download or open file when I clicked.

How should I do?

Nov 19 '05 #2
ABC
I want to write download file link which filename retrieved from database
field.
"Patirck Ige" <na********@hot mail.com> wrote in message
news:Oj******** ******@TK2MSFTN GP12.phx.gbl...
What are you trying to do?
Patrick

"ABC" <abc.abc.com> wrote in message
news:Ot******** ******@TK2MSFTN GP12.phx.gbl...
I write the code as:
<asp:LinkButt on ID="LinkButton2 " Text='<%# Eval("Title") %>'
PostBackUrl='fi le://<%# Eval("path") %>' runat="server"> </asp:LinkButton>

But It don't work to download or open file when I clicked.

How should I do?


Nov 19 '05 #3
Where do you ge the error?
Any errors?

"ABC" <abc.abc.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
I want to write download file link which filename retrieved from database
field.
"Patirck Ige" <na********@hot mail.com> wrote in message
news:Oj******** ******@TK2MSFTN GP12.phx.gbl...
What are you trying to do?
Patrick

"ABC" <abc.abc.com> wrote in message
news:Ot******** ******@TK2MSFTN GP12.phx.gbl...
I write the code as:
<asp:LinkButt on ID="LinkButton2 " Text='<%# Eval("Title") %>'
PostBackUrl='fi le://<%# Eval("path") %>' runat="server"> </asp:LinkButton>
But It don't work to download or open file when I clicked.

How should I do?



Nov 19 '05 #4
ABC
I browsing from the server. no error message showed. When I clicked the
link, no response, no file open or download.

The source code from browser showed as:

<table cellspacing="0" cellpadding="2" border="0"
id="GViewDocume ntSearchResult"
style="color:Bl ack;background-color:LightGold enrodYellow;bor der-color:Tan;borde r-width:1px;borde r-style:solid;wid th:100%;border-collapse:collap se;">
<tr style="backgrou nd-color:Tan;font-weight:bold;">
<th scope="col">&nb sp;</th>
</tr><tr>
<td>
<a
id="GViewDocume ntSearchResult_ ctl02_HyperLink 2"
href="file://c:\docs\mcgraw. hill.osborne.me dia.microsoft.s ql.server.2005. new.features.tx t"
target="_blank" >Table of Contents</a>
(<span
id="GViewDocume ntSearchResult_ ctl02_LblSize"> 6942591</span> Bytes)<br />
<span
id="GViewDocume ntSearchResult_ ctl02_Label2">B ack Cover. Get full details on
all the innovative features and benefits available in the upcoming release
of SQL Server 2005. This authoritative guide explains the new and improved
enterprise data management capabilities, developer functions, and business
intelligence tools. Youâ?Tll see how the new release offers enhanced
scalability, availability, and security, as well as ease-of-use. Written by
the Senior Technical Editor of SQL Server Magazine, this is an ideal
resource for decis</span><br />
<a
id="GViewDocume ntSearchResult_ ctl02_HyperLink 1"
href="file://c:\docs\mcgraw. hill.osborne.me dia.microsoft.s ql.server.2005. new.features.tx t"
target="_blank" >c:\pcmsdocs\mc graw.hill.osbor ne.media.micros oft.sql.server. 2005.new.featur es.chm</a><br
/>
</td>
</tr><tr style="backgrou nd-color:PaleGolde nrod;">
<td>
<a
id="GViewDocume ntSearchResult_ ctl03_HyperLink 2"
href="file://c:\docs\oreilly .essential.busi ness.process.mo deling.2005.txt "
target="_blank" >Y</a>
(<span
id="GViewDocume ntSearchResult_ ctl03_LblSize"> 4068714</span> Bytes)<br />
<span
id="GViewDocume ntSearchResult_ ctl03_Label2">I ndex. SYMBOL. A. B. C. D. E. F.
G. H. J. K. L. M. N. O. P. Q. R. T. U. V. W. X. Y. abstract processes. 2nd.
abstractProcess attribute. action activity. actions, pi-calculus and.
activities. automated. BPDM and. BPEL and. 3rd. BPML processes and. BPMN
and. BPRI and. branching. canceling. compensation and. dead path
elimination. defined. forking. insurance claims processing example. looping
and. merging conditional paths. milestones and. multiple instances of.
activity control category (WAPI). </span><br />
<a
id="GViewDocume ntSearchResult_ ctl03_HyperLink 1"
href="file://c:\docs\oreilly .essential.busi ness.process.mo deling.2005.txt "
target="_blank" >c:\pcmsdocs\or eilly.essential .business.proce ss.modeling.aug .2005.chm</a><br
/>
</td>
</tr><tr>
<td>
<a
id="GViewDocume ntSearchResult_ ctl04_HyperLink 2"
href="file://c:\docs\wrox.pr ess.beginning.a sp.net.2.0.data bases.beta.prev iew.mar.2005.tx t"
target="_blank" >untitled</a>
(<span
id="GViewDocume ntSearchResult_ ctl04_LblSize"> 6699859</span> Bytes)<br />
<span
id="GViewDocume ntSearchResult_ ctl04_Label2">B eginning ASP.NET 2.0 Databases
Beta Preview TEAM LinG -Live, Informative, Non-cost and Genuine !. TEAM
LinG -Live, Informative, Non-cost and Genuine !. Beginning ASP.NET 2.0
Databases Beta Preview John Kauffman with Thiru Thangarathinam TEAM
LinG -Live, Informative, Non-cost and Genuine !Beginning ASP.NET 2.0
Databases Beta Preview Published by Wiley Publishing, Inc. 10475 Crosspoint
Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2005 by Wiley
Publishing, Inc. Indianapolis</span><br />
<a
id="GViewDocume ntSearchResult_ ctl04_HyperLink 1"
href="file://c:\docs\wrox.pr ess.beginning.a sp.net.2.0.data bases.beta.prev iew.mar.2005.tx t"
target="_blank" >c:\pcmsdocs\wr ox.press.beginn ing.asp.net.2.0 .databases.beta .preview.mar.20 05.ebook-ling.pdf</a><br
/>
</td>
</tr>
</table>


"Patirck Ige" <na********@hot mail.com> wrote in message
news:ui******** ******@TK2MSFTN GP09.phx.gbl...
Where do you ge the error?
Any errors?

"ABC" <abc.abc.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
I want to write download file link which filename retrieved from database
field.
"Patirck Ige" <na********@hot mail.com> wrote in message
news:Oj******** ******@TK2MSFTN GP12.phx.gbl...
> What are you trying to do?
> Patrick
>
> "ABC" <abc.abc.com> wrote in message
> news:Ot******** ******@TK2MSFTN GP12.phx.gbl...
>> I write the code as:
>> <asp:LinkButt on ID="LinkButton2 " Text='<%# Eval("Title") %>'
>> PostBackUrl='fi le://<%# Eval("path") %>' runat="server"> </asp:LinkButton> >>
>> But It don't work to download or open file when I clicked.
>>
>>
>>
>> How should I do?
>>
>>
>
>



Nov 19 '05 #5
PostBackUrl is for cross page postbacks. If you want a link to do a download
of a file form your database, I'd suggest writing a handler (say .ashx file)
to do the load from your database. Then all your link needs to be is a standand
<a> to the ashx file.

-Brock
DevelopMentor
http://staff.develop.com/ballen
I write the code as:
<asp:LinkButt on ID="LinkButton2 " Text='<%# Eval("Title") %>'
PostBackUrl='fi le://<%# Eval("path") %>'
runat="server"> </asp:LinkButton>
But It don't work to download or open file when I clicked.

How should I do?

Nov 19 '05 #6
the binding expression (<%# %>) to be the only value in a attribute, or it
won't be detected as a binding expression and will be treated as a string
value. try:

<asp:LinkButt on ID="LinkButton2 " Text='<%# Eval("Title") %>'
PostBackUrl='<% # "file://" + Eval("path") %>' runat="server" />

also be sure you call DataBind(), so binding is performed.

-- bruce (sqlwork.com)
"ABC" <abc.abc.com> wrote in message
news:Ot******** ******@TK2MSFTN GP12.phx.gbl...
I write the code as:
<asp:LinkButt on ID="LinkButton2 " Text='<%# Eval("Title") %>'
PostBackUrl='fi le://<%# Eval("path") %>' runat="server"> </asp:LinkButton>

But It don't work to download or open file when I clicked.

How should I do?

Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
12293
by: KBuser | last post by:
I've been looking around for the proper syntax, and have only found one instance where it appeared somebody else was trying the same thing, but didn't post how they had achieved their desired result. What I want to do is PostBackUrl="mypage.asp?myid="+txtSearch where txtSearch is the name of my text box containing the variable i want to...
0
1250
by: wendylau81 | last post by:
We are currently using ASP.NET 2.0 to revamp one of our web applications. Let me try to briefly explain how each page is laid out... Usually within the page, there are 3 components... The header, the body, and the footer. The header and footer are user controls created by one of our developers, and contain things that all the pages in our...
1
2189
by: Wendy | last post by:
I had previously posted this in inetserver.asp.components, I don't think that was the right place... anyways, here is a repost: We are currently using ASP.NET 2.0 to revamp one of our web applications. Let me try to briefly explain how each page is laid out... Usually within the page, there are 3 components... The header, the body, and...
0
1306
by: Wendy | last post by:
We are currently using ASP.NET 2.0 to revamp one of our web applications. Let me try to briefly explain how each page is laid out... Usually within the page, there are 3 components... The header, the body, and the footer. The header and footer are user controls created by one of our developers, and contain things that all the pages in our...
4
5332
by: sck10 | last post by:
Hello, Can you use the PostBackUrl to post to different sites? I have a page (PostBackURL.aspx' ) on one website (same server) that has a button set to: PostBackURL="http://zone1.web.com" When the second page opened, and tried to get a hidden value on the previous page, I got the following error:
1
4760
by: Chris | last post by:
Hi, i created an ImageButton within an ItemTemplate of a datalist (in shop.aspx). There are two possibilities: 1) when the user is logged and he clicks on an image, he must be 'postbacked' to another file showing that same picture in big size and with more info.. 2) when not logged and clicking on an image, he must be 'postbacked' to the...
2
6318
by: noneya22 | last post by:
I'm using asp.net 2.0. I have a page that has a save button and a cancel button along with a text field. All controls are asp.net server controls. I have JavaScript that prompts the user if he has maninpulated data in the text field and then tries to leave the page. The purpose is to prevent the user from accidentally losing his changes. ...
1
3269
by: =?Utf-8?B?Sm9l?= | last post by:
I have a page that has a drop down list that does a autopost back which brings up a datagrid. I then also have a button at the bottom that has a PostBackUrl property to go to another page. I cannot get the button with the postbackurl to work at all. The drop down has to be used for the properties to be set so I know it is doing one post...
4
4112
by: Nathan Sokalski | last post by:
I have a Button that uses the PostBackUrl property which is inside a Repeater template. When I get to the Page that is being posted to (the one specified in PostBackUrl), I am having trouble getting access to the Button that was clicked, because I cannot use the PreviousPage.FindControl() method since I do not know the id of the Button. What...
0
7668
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5984
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3466
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.