Click here to Skip to main content
15,913,944 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Set Frame Pin
boy.pockets5-Dec-07 18:20
boy.pockets5-Dec-07 18:20 
GeneralUser Accounts Pin
Ken Mazaika5-Dec-07 13:17
Ken Mazaika5-Dec-07 13:17 
GeneralRe: User Accounts Pin
Christian Graus5-Dec-07 14:16
protectorChristian Graus5-Dec-07 14:16 
GeneralRe: User Accounts Pin
Ken Mazaika5-Dec-07 16:26
Ken Mazaika5-Dec-07 16:26 
GeneralImplementing asp:CreateUserWizard Pin
AghaKhan5-Dec-07 13:04
AghaKhan5-Dec-07 13:04 
Questionhow to write code to download file Pin
uowzd015-Dec-07 11:48
uowzd015-Dec-07 11:48 
AnswerRe: how to write code to download file Pin
Christian Graus5-Dec-07 12:09
protectorChristian Graus5-Dec-07 12:09 
AnswerRe: how to write code to download file Pin
Sandeep Akhare5-Dec-07 19:31
Sandeep Akhare5-Dec-07 19:31 
Another way is to add the file in header of the response

<br />
tring filename = "YourFileName.xls";<br />
<br />
if (filename != "")<br />
{<br />
<br />
string path = Server.MapPath(filename);<br />
<br />
System.IO.FileInfo file = new System.IO.FileInfo(path);<br />
<br />
if (file.Exists)<br />
{<br />
<br />
Response.Clear();<br />
<br />
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);<br />
<br />
Response.AddHeader("Content-Length", file.Length.ToString());<br />
<br />
Response.ContentType = "application/octet-stream";<br />
<br />
Response.WriteFile(file.FullName);<br />
<br />
Response.End();<br />
<br />
}<br />
<br />
else<br />
{<br />
<br />
Response.Write("This file does not exist.");<br />
<br />
}<br />
<br />



Thanks and Regards
Sandeep

If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "




GeneralGRIDVIEW: make cell visible only when checkbox is checked Pin
allenpotter5-Dec-07 11:23
allenpotter5-Dec-07 11:23 
GeneralLogin control error Pin
solarthur015-Dec-07 7:22
solarthur015-Dec-07 7:22 
Generalnested grid Pin
wasimsharp5-Dec-07 6:55
wasimsharp5-Dec-07 6:55 
GeneralRe: nested grid Pin
Fred_Smith5-Dec-07 7:02
Fred_Smith5-Dec-07 7:02 
GeneralRe: nested grid Pin
Member 38798815-Dec-07 17:09
Member 38798815-Dec-07 17:09 
GeneralRe: nested grid Pin
Sathesh Sakthivel5-Dec-07 17:28
Sathesh Sakthivel5-Dec-07 17:28 
GeneralUser controls in IE - Runtime Security Policy / Code Groups Pin
RichardGrimmer5-Dec-07 5:46
RichardGrimmer5-Dec-07 5:46 
GeneralPerforming Calulations Upon Data Pin
Paul McGann5-Dec-07 5:37
professionalPaul McGann5-Dec-07 5:37 
GeneralRe: Performing Calulations Upon Data Pin
J4amieC5-Dec-07 6:10
J4amieC5-Dec-07 6:10 
GeneralRe: Performing Calulations Upon Data Pin
Paul McGann5-Dec-07 7:46
professionalPaul McGann5-Dec-07 7:46 
GeneralRe: Performing Calulations Upon Data Pin
Pete O'Hanlon5-Dec-07 10:53
mvePete O'Hanlon5-Dec-07 10:53 
QuestionGridView - Urgent Pin
Kavita5-Dec-07 5:20
Kavita5-Dec-07 5:20 
GeneralRe: GridView - Urgent Pin
Paul McGann5-Dec-07 5:39
professionalPaul McGann5-Dec-07 5:39 
GeneralRe: GridView - Urgent Pin
cisco21035-Dec-07 5:42
cisco21035-Dec-07 5:42 
QuestionRe: GridView - Urgent Pin
Kavita5-Dec-07 22:43
Kavita5-Dec-07 22:43 
AnswerRe: GridView - Urgent Pin
sukkureddy27-May-08 20:32
sukkureddy27-May-08 20:32 
GeneralASP placeholder control: Spaces between divs Pin
edukulla5-Dec-07 5:19
edukulla5-Dec-07 5:19 

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.