|
I want to implement a file download dialog box functionality as we can see in many websites in my aspx page. The files to be downloaded may be of any type.
Thanks in advance
|
|
|
|
|
Hi there,
To force the download dialog box at the client, you simply use the Content-Disposition header field with the attachment parameter, you also can use the filename parameter to suggest a file name for the file as you want.
private void Page_Load(object sender, System.EventArgs e)
{
string strFileName = "....";
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + strFileName);
byte[] bytes = GetFileContent(strFileName);
Response.BinaryWrite(bytes);
Response.End();
} The GetFileContent simply reads the content of a specified file.
|
|
|
|
|
Hi,
In ASP,How we can segregate our problem is client & Server side?Any one can help me!
I'm keen on waiting for any response.
thanking you
regards
rex
|
|
|
|
|
Try multiple clients (different browsers/operating systems) and see if the issue is the same for each. Without more information I can't really help you...
Dirk Watkins
|
|
|
|
|
Hi.. I'm currently doing a web design on the calendar. I would like to ask that if i click the date on the calendar, how can i make it appear on the text box once i click on the date? I have tried several ways of doing it but it does not show out. Did anyone know how to call the date out onto the textbox? Your help will be greatly appreciated.Thank
Cheers!
|
|
|
|
|
sRtn = showModalDialog("Datescripts/calendar.htm","","center=yes;dialogWidth=350pt;dialogHeight=200pt");
if (sRtn!="")
elTarget.value = sRtn;
try to match this into your onclick function (javascript)
|
|
|
|
|
When You Open a New Window
When you open a new window (Calendar) just pass your form name along with the textbox name.
Inside The Your Code in NEWWINDOW.ASP
When you click any control in NEWWINDOW.ASP you may call some function.
In that function use the following code.
if (opener !=null){
var updateTo=eval("opener.document." + hSourceCtrlName);
updateTo.value=dateField;
updateTo.focus();
}
Where hSourceCtrlName=FORM NAME.TEXT BOX NAME(where you want to return focus)
Where dateField =Your Date.
N.Rajakumar B.E.,
Application Developer,
|
|
|
|
|
Dear All
I am using a webBrowser control as part of my project which i am developing. After loading a web page within a dialog box, I am interested in segmenting the current web page into coherent blocks (for example: images, tables, lists). I have tried detecting collections of html elements (images, paragraphs, divs...) by retrieving them from an instance of the html document.
Now, i am not sure if its the right method to segment a web page. Because i will end up specifying (hard coding) which elements to detect (anchors (a), divs, tablerows (tr), tabledata(td), unordered lists (ul)... and so forth)
detecting such elements and storing them in blocks will create redundancy. for example may contain anchors . detecting each seperately will result in blocks within blocks !!!
Does any body have a good idea for implementing the segmentation. I hope i have put it forward and not confused you guys.
Your views will be very much appreciated
llp00na
|
|
|
|
|
Hi,
I am a C/C++ programmer, mainly in the embedded processor area, so please excuse this novice question.
I need to automatically read emails received from the Internet (rx'd via Outlook or similar) and respond with a document attached. The particular document will be dependant on the contents of the email.
I can find 'plugin' autoresponders but they just send a set message, I need something more.
I have no idea where to begin with this (I though perhaps using MAPI in C++ but that seems to be more suitable for internal email).
Anyone got any good ideas or suggest where I should be looking?
Many Thanks,
Ali
|
|
|
|
|
MAPI should work fine. Though to send emails out you may have to require a manual login (at the startup of your software) so that the Microsoft Outlook security doesn't pop up saying "do you want to allow this email to be sent?"
If you want this to come up automatically on a server, it may work better to send the emails out using the SMTP mail protocol
|
|
|
|
|
Thanks for the reponse, I thought perhaps there would be an easier way (wishfull thinking I suppose).
I will have to go away and play with MAPI and see what happens .
Thanks again,
Ali
|
|
|
|
|
How to hide(remove) status bar in firefox using javascript. Plz reply iam new to this forum
Srini
|
|
|
|
|
Hi, does any one any free tool, free application or resource (document) in order to create a web menu in a webpage?
|
|
|
|
|
|
Thank you very much for your comment. But do you have any other way beside download the control? I mean are there a complete source code (javascript) that I could just copy and paste in an HTML source file then i could use the menu when i run it?
|
|
|
|
|
Roath Kanel wrote: I mean are there a complete source code (javascript) that I could just copy and paste in an HTML source file then i could use the menu when i run it?
Sure, u just google a bit... then copy the code into ur page...
Menu JS
<< >>
|
|
|
|
|
Thank you very much for your information. That is much more interesting.
Best regard,
|
|
|
|
|
Is there a wrapper for the xls file type in .net? Can anybody suggest a link or something...
I hope I understand...because is a rough world out there...
|
|
|
|
|
Vlad Stanciu wrote: Is there a wrapper for the xls file type in .net?
You can attach to Excel as a COM object, but there's no wrapper to create xls files. I believe there is an XML format you can use tho.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank's for your answer.
I was looking for a specialied class that could let me edit the contnents of a givven xls file, that's why I asked for an existing wrapper. But since this is or very hard to find, or inexistent and most certanly hard to make, I searched and found a simple solution that allowed me to do exacly just what I wanted : OleDb
I understand sometimes ...yes, there is a rough world...
|
|
|
|
|
hi
how can i protect my users from uploading or downloading files that contain viruses ,trojans or files that have problem such a jpg file that is realy is an executive file which it's extnsion was changed to jpg or else !
notice that i don't have a dedicated server and i brought some space on one host.
what can i do for controling such files?
thanx
|
|
|
|
|
Hi everyone,
I have a piece of ASP code on windows 2003 server like:
<%
url = "http://www.xxxxx.com/main.html"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
Response.write xmlhttp.responseText
set xmlhttp = nothing
%>
It works fine before, and now I get an error sometime like :
msxml3.dll error '80072ee2'
The operation timed out
/test.asp, line 83
Could anybody know how to fix it?
thanks a lot in advance!!!
Alan Shen
MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
|
|
|
|
|
How to redirect a user to a ASP page on click of a button.
In detail:- I have one html page in which one button is their, I want to redirect user to my 'rptview.asp' page on that buton click which will display the result frm database. any body can hlp plz....
Chintan
|
|
|
|
|
Is this what you need?
<html>
<head></head>
<body>
<form action="#" method="get">
<input type="button" value="Click Me" onclick="location.href='http://www.cnn.com';" />
</form>
</body>
</html>
"we must lose precision to make significant
statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
How can I do in hmtl and embedded javascript, to list the contents in a local client folder?
|
|
|
|