Click here to Skip to main content
15,921,454 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: One advantage of Cobol Pin
pbraun10-Apr-07 6:33
pbraun10-Apr-07 6:33 
GeneralRe: One advantage of Cobol Pin
Michael Hendrickx11-Apr-07 19:57
Michael Hendrickx11-Apr-07 19:57 
GeneralRe: One advantage of Cobol Pin
Mark_Wallace20-Apr-07 11:50
Mark_Wallace20-Apr-07 11:50 
GeneralHilarious BugFix By Developer Pin
Vasudevan Deepak Kumar4-Apr-07 7:03
Vasudevan Deepak Kumar4-Apr-07 7:03 
GeneralRe: Hilarious BugFix By Developer Pin
Christian Graus4-Apr-07 10:24
protectorChristian Graus4-Apr-07 10:24 
GeneralRe: Hilarious BugFix By Developer Pin
pbraun5-Apr-07 8:04
pbraun5-Apr-07 8:04 
GeneralRe: Hilarious BugFix By Developer Pin
foste10-Apr-07 5:49
foste10-Apr-07 5:49 
Generalis it good way for download ? Pin
PavanPareta3-Apr-07 21:33
PavanPareta3-Apr-07 21:33 
(DOWNLOAD Book)link where would u make it.

DOWNLOAD Book
a href="dnload.aspx?filebook=../pdf/book.pdf
dnload.aspx
// download page load event
string strRequest = Request.QueryString["filebook"];
if (strRequest != "")
{
    string path = Server.MapPath(strRequest);
    System.IO.FileInfo file = new System.IO.FileInfo(path);
    if (file.Exists == true)
    {
        Response.Clear();
        Response.AddHeader("Content-Disposition", "attachment; filename=" + filebook.Name);
        Response.AddHeader("Content-Length", file.Length.ToString());
        Response.ContentType = "application/octet-stream";
        Response.WriteFile(filebook.FullName);
        Response.End();
    }
    else
    {
        Response.Write("This file does not exist.");
    }
}
else
{
    Response.Write("Please provide a file to download.");
}


Pavan Pareta

GeneralRe: is it good way for download ? Pin
Vasudevan Deepak Kumar4-Apr-07 7:01
Vasudevan Deepak Kumar4-Apr-07 7:01 
GeneralString Error Pin
Programm3r3-Apr-07 7:25
Programm3r3-Apr-07 7:25 
GeneralRe: String Error Pin
PJ Arends3-Apr-07 10:07
professionalPJ Arends3-Apr-07 10:07 
GeneralRe: String Error Pin
Ed.Poore3-Apr-07 10:39
Ed.Poore3-Apr-07 10:39 
GeneralRe: String Error Pin
PIEBALDconsult3-Apr-07 11:03
mvePIEBALDconsult3-Apr-07 11:03 
GeneralRe: String Error Pin
Steve Hansen4-Apr-07 4:37
Steve Hansen4-Apr-07 4:37 
GeneralRe: String Error Pin
John R. Shaw4-Apr-07 17:11
John R. Shaw4-Apr-07 17:11 
GeneralRe: String Error Pin
Pete O'Hanlon4-Apr-07 22:29
mvePete O'Hanlon4-Apr-07 22:29 
GeneralRe: String Error Pin
NormDroid11-Apr-07 1:56
professionalNormDroid11-Apr-07 1:56 
GeneralRe: String Error Pin
MaxRelaxman30-Apr-07 5:46
MaxRelaxman30-Apr-07 5:46 
GeneralWhat did i miss? Pin
Shog92-Apr-07 8:13
sitebuilderShog92-Apr-07 8:13 
GeneralRe: What did i miss? Pin
led mike2-Apr-07 8:38
led mike2-Apr-07 8:38 
GeneralRe: What did i miss? Pin
Mike_V2-Apr-07 16:11
Mike_V2-Apr-07 16:11 
GeneralRe: What did i miss? Pin
Pete O'Hanlon3-Apr-07 1:41
mvePete O'Hanlon3-Apr-07 1:41 
GeneralRe: What did i miss? Pin
pbraun5-Apr-07 7:54
pbraun5-Apr-07 7:54 
GeneralRe: What did i miss? Pin
Chris Maunder6-Apr-07 21:14
cofounderChris Maunder6-Apr-07 21:14 
GeneralSo to get this right Pin
peterchen8-Apr-07 10:13
peterchen8-Apr-07 10:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.