And the top of the Download.aspx code behind looks like this
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ctx As HttpContext = HttpContext.Current
Dim response As HttpResponse = ctx.Response
Dim sFile As String = "mit-license.txt" ' Request.QueryString("filename").ToString
' Buffer to read 10K bytes in chunk:
Dim buffer(10000) As Byte
' Length of the file:
Dim length As Integer
' Total bytes to read:
Dim dataToRead As Long
' Identify the file to download including its path.
Dim filepath As String = "D:\ACS Desktop\AWC\" + sFile
I could not find the INPUT value - where does it pass in? I checked the "sender" and the ctx objects and could not find it...
I hardwired the mit-license.txt filename to prove that the download works...
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
Re: How do I read this IFRAME's hidden input value
Thank you!
Code:
?Request.Form(0)
"mit-license.txt"
Is that value as easy for a user to see as a QUERY string in an address bar? Or is it reasonable "secure" by the fact that it's buried down a bit. It's obviously in the POST.
Also - I don't see the POST in FIREBUG like other ones - actually I see this 404 error - I believe it's intentional
Code:
if(url && data){
// remove old iframe if has
if($("#iframeX")) $("#iframeX").remove();
// creater new iframe
iframeX= $('<iframe src="[removed]false;" name="iframeX" id="iframeX"></iframe>').appendTo('body').hide();
if($.browser.msie){
downloadInterval = setInterval(function(){
// if loading then readyState is “loading” else readyState is “interactive”
if(iframeX&& iframeX[0].readyState !=="loading"){
callback();
clearInterval(downloadInterval);
}
}, 23);
} else {
iframeX.load(function(){
callback();
});
}
Because of the src="[removed]false. What would be the purpose of that? Are my users going to see ERROR messages in the browser task bar??
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
About halfway down you will this "version" of the function and see comments about callbacks and what not - I have not even gotten close to figuring out what they are talking about in that regard.
But ultimately - this is working - I do get a file dialog popup for saving/opening the document without losing the page I am on.
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".