Click here to Skip to main content
15,900,108 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionasp.net Pin
yang__lee9-May-08 6:30
yang__lee9-May-08 6:30 
AnswerRe: asp.net Pin
Blue_Boy9-May-08 6:33
Blue_Boy9-May-08 6:33 
GeneralRe: asp.net Pin
Ashish Sehajpal9-May-08 19:58
Ashish Sehajpal9-May-08 19:58 
GeneralRe: asp.net Pin
Blue_Boy10-May-08 1:48
Blue_Boy10-May-08 1:48 
AnswerRe: asp.net Pin
Abhijit Jana9-May-08 20:39
professionalAbhijit Jana9-May-08 20:39 
Questionhow to disable previous dates in popup Calendar using Ajax Calendar control Pin
Johndas9-May-08 5:20
Johndas9-May-08 5:20 
AnswerRe: how to disable previous dates in popup Calendar using Ajax Calendar control Pin
ChrisKo9-May-08 9:02
ChrisKo9-May-08 9:02 
QuestionSingleton Pattern Pin
Pranav Thakur9-May-08 3:53
Pranav Thakur9-May-08 3:53 
Hi,

I want to open only one PDF file using singleton pattern.I have written a code as follows on button click event:-

FileInfo objFile;
string strFileName;
strFileName = "User Manual - Quality Feedback System.pdf";
objFile = new FileInfo(Server.MapPath(ConfigurationSettings.AppSettings["App_Name"]) + "\\" + strFileName);
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + objFile.Name);
Response.Flush();
Response.WriteFile(objFile.FullName);
Response.End();

The problem with the above code is that it opens more than one PDF file if button is clicked more than once.How can I make sure that one PDF file gets opened using Singleton design pattern.I am clear with the concept of singleton pattern but I am not able to implement this concept in my problem.Please help.
AnswerRe: Singleton Pattern Pin
Sylvester george9-May-08 4:15
Sylvester george9-May-08 4:15 
AnswerRe: Singleton Pattern Pin
led mike9-May-08 4:21
led mike9-May-08 4:21 
AnswerRe: Singleton Pattern Pin
Guffa9-May-08 5:17
Guffa9-May-08 5:17 
GeneralRe: Singleton Pattern Pin
Pranav Thakur9-May-08 5:43
Pranav Thakur9-May-08 5:43 
GeneralRe: Singleton Pattern Pin
CodingYoshi9-May-08 12:02
CodingYoshi9-May-08 12:02 
QuestionAsp:HyperLink Pin
danasegaranea9-May-08 3:39
danasegaranea9-May-08 3:39 
AnswerRe: Asp:HyperLink Pin
Sylvester george9-May-08 3:49
Sylvester george9-May-08 3:49 
GeneralRe: Asp:HyperLink Pin
danasegaranea9-May-08 3:56
danasegaranea9-May-08 3:56 
GeneralRe: Asp:HyperLink Pin
Sylvester george9-May-08 4:02
Sylvester george9-May-08 4:02 
GeneralRe: Asp:HyperLink Pin
danasegaranea9-May-08 4:18
danasegaranea9-May-08 4:18 
QuestionError in Mailing Pin
Krazy Programmer9-May-08 3:23
Krazy Programmer9-May-08 3:23 
AnswerRe: Error in Mailing Pin
Sylvester george9-May-08 3:54
Sylvester george9-May-08 3:54 
AnswerRe: Error in Mailing Pin
eyeseetee9-May-08 3:58
eyeseetee9-May-08 3:58 
GeneralRe: Error in Mailing Pin
Krazy Programmer9-May-08 7:00
Krazy Programmer9-May-08 7:00 
QuestionA socket operation was attempted to an unreachable host Pin
eyeseetee9-May-08 3:17
eyeseetee9-May-08 3:17 
AnswerRe: A socket operation was attempted to an unreachable host Pin
Sylvester george9-May-08 3:57
Sylvester george9-May-08 3:57 
GeneralRe: A socket operation was attempted to an unreachable host Pin
eyeseetee9-May-08 3:59
eyeseetee9-May-08 3:59 

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.