Click here to Skip to main content
15,898,770 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAdd attribute to a dynamically created imagebutton control Pin
CandyMe22-Oct-07 6:04
CandyMe22-Oct-07 6:04 
AnswerRe: Add attribute to a dynamically created imagebutton control Pin
Fred_Smith22-Oct-07 6:37
Fred_Smith22-Oct-07 6:37 
GeneralRe: Add attribute to a dynamically created imagebutton control Pin
CandyMe22-Oct-07 18:32
CandyMe22-Oct-07 18:32 
AnswerRe: Add attribute to a dynamically created imagebutton control Pin
firozu22-Oct-07 20:24
firozu22-Oct-07 20:24 
GeneralRe: Add attribute to a dynamically created imagebutton control Pin
Fred_Smith22-Oct-07 22:33
Fred_Smith22-Oct-07 22:33 
GeneralRe: Add attribute to a dynamically created imagebutton control Pin
CandyMe24-Oct-07 23:15
CandyMe24-Oct-07 23:15 
QuestionI only see "Content Files" in the Add Project Output Group dialog box Pin
ONeil Tomlinson22-Oct-07 5:58
ONeil Tomlinson22-Oct-07 5:58 
QuestionCatching Invalid Email attachments Pin
Torin_DWC22-Oct-07 5:44
Torin_DWC22-Oct-07 5:44 
Hello, I'm working on an internal e-mail utility to send messages to different groups from a database. One feature i'm implementing is the ability to add e-mail attachments. I have every thing working the way it should but it seems if a user tries to attach an Exe file, the page breaks.
for instance, if you had the file "breakit.exe" and tried to attach it, it would give me a "page cannot be displayed error" after I hit the "upload" button. if you try this with a .jpg, .txt, or anything it works, but the page breaks even if I try to change the name of "breakit.exe" to "breakit.notanexe".
Does any one know how to detect this problem before the page breaks?

thanks,
-Ian.M

if ((File1.PostedFile != null) && (File1.PostedFile.ContentLength > 0))
{
string fn = System.IO.Path.GetFileName(File1.PostedFile.FileName);
string SaveLocation = Server.MapPath("Data\\" + ParentSessionID.Value);


if (!System.IO.Directory.Exists(SaveLocation))
{
System.IO.Directory.CreateDirectory(SaveLocation);
}

try
{
File1.PostedFile.SaveAs(SaveLocation + "\\" + fn);
}
catch (Exception ex)
{
}
}
AnswerRe: Catching Invalid Email attachments Pin
Scott Dorman22-Oct-07 5:55
professionalScott Dorman22-Oct-07 5:55 
AnswerRe: Catching Invalid Email attachments Pin
J4amieC22-Oct-07 5:58
J4amieC22-Oct-07 5:58 
GeneralRe: Catching Invalid Email attachments Pin
Torin_DWC22-Oct-07 6:58
Torin_DWC22-Oct-07 6:58 
GeneralRe: Catching Invalid Email attachments Pin
J4amieC22-Oct-07 10:56
J4amieC22-Oct-07 10:56 
GeneralRe: Catching Invalid Email attachments Pin
Torin_DWC23-Oct-07 4:42
Torin_DWC23-Oct-07 4:42 
QuestionE_OUTOFMEMORY(0*8007000E) When Generating Reports Pin
HatakeKaKaShi22-Oct-07 4:29
HatakeKaKaShi22-Oct-07 4:29 
AnswerRe: E_OUTOFMEMORY(0*8007000E) When Generating Reports Pin
Saksida Bojan22-Oct-07 4:36
Saksida Bojan22-Oct-07 4:36 
GeneralRe: E_OUTOFMEMORY(0*8007000E) When Generating Reports Pin
HatakeKaKaShi22-Oct-07 5:57
HatakeKaKaShi22-Oct-07 5:57 
GeneralRe: E_OUTOFMEMORY(0*8007000E) When Generating Reports Pin
Saksida Bojan22-Oct-07 6:15
Saksida Bojan22-Oct-07 6:15 
Questionhow can i use button click event of another page in recent page???? Pin
yogesh_softworld12322-Oct-07 4:26
yogesh_softworld12322-Oct-07 4:26 
AnswerRe: how can i use button click event of another page in recent page???? Pin
Abhijit Jana22-Oct-07 4:32
professionalAbhijit Jana22-Oct-07 4:32 
AnswerRe: how can i use button click event of another page in recent page???? Pin
Abhijit Jana22-Oct-07 5:01
professionalAbhijit Jana22-Oct-07 5:01 
QuestionEncrypting connectionStrings Pin
#realJSOP22-Oct-07 3:58
professional#realJSOP22-Oct-07 3:58 
AnswerRe: Encrypting connectionStrings Pin
Saksida Bojan22-Oct-07 4:34
Saksida Bojan22-Oct-07 4:34 
GeneralRe: Encrypting connectionStrings Pin
#realJSOP22-Oct-07 4:38
professional#realJSOP22-Oct-07 4:38 
GeneralRe: Encrypting connectionStrings Pin
Saksida Bojan22-Oct-07 4:40
Saksida Bojan22-Oct-07 4:40 
GeneralRe: Encrypting connectionStrings Pin
#realJSOP22-Oct-07 8:08
professional#realJSOP22-Oct-07 8:08 

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.