|
ok thank you for your help
i have found one way of doin it
private void SaveFileToDesktop(string fileName, string fullFilePath, string fileContentType)
{
//*** check if the file exists
if (File.Exists(fullFilePath))
{
//*** create new file and get length
FileInfo iFile = new FileInfo(fullFilePath);
long fileLength = iFile.Length;
//***
Response.Clear();
Response.ContentType = fileContentType;
Response.AddHeader("Content-Length", fileLength.ToString());
Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName);
Response.WriteFile(fullFilePath);
Response.End();
}
}
but i will also take alook at the security side of things and advice about where to start learning about security
|
|
|
|
|
Hi
i want to put a rounded png image on the button.and button look no longer.
i also set the style of button to flat but it display a border how can i transaprent the border
|
|
|
|
|
For God's sake, stop reposting your question over and over again!! This could be what? The tenth time you post the same question about rounded buttons?!! You've taken about a dozen answers in your older threads and now we are all ignoring you because of this very rude reposting!!
Regards
|
|
|
|
|
Hi,
I have a small question.
Suppose i have this code:
while(condition)
{
try
{
if(condition)
{
break;
}
}
catch(exception)
{
//code
}
}
Where would i be if the break statement is executed?
Im trying to get out the while statement. Im just not sure where the break statement would take me.
Thanks in advance!
|
|
|
|
|
According to MSDN the "break statement terminates the closest enclosing loop or switch statement in which it appears. Control is passed to the statement that follows the terminated statement, if any." So control is passed to the statement following your while-loop. Take a look at the MSDN topic[^]; they have an example similar to yours using a for-loop instead of the while-loop
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
|
hi everyone, i think im in a real trouble, i was developing an application in c# for almost one month and 2 weeks ago i made several backups of the project folder, and now i just cant find it!! whenever i open my project i keep on getting the older versions i made as a back up but not my latest updates on that project!! please help me
|
|
|
|
|
Hi,
If you remember the folders name, try the search function of windows.
|
|
|
|
|
thanx
|
|
|
|
|
Search for *.sln if your new version exists, there will be a .sln file.
|
|
|
|
|
thanx
|
|
|
|
|
You can also verify it by checking last modified date of the files.
Best Regards,
Apurva Kaushal
|
|
|
|
|
thanx
|
|
|
|
|
Hi,
I trying to use different Dll's in my project, more specific, strongly named and weakly named combined in the same project. But it seems that VS (C#) wants me to sign all the assembly's in the project with the key, before i can build the project.
Is there a way to combine third party weakly named with our strongly named dll's in one project?
I also tried a tool IlMerge to make a strongly named dll of a third party dll, but for some reason the program didn't want to add an assembly/key to it..
Thx
Kurt
|
|
|
|
|
What type of project is this? And when you say that you are trying to use different DLLs in your project do you mean you are adding references to them?
You can mix strongly named assemblies and 'weakly' named assemblies in your project references, we do it here, but there's a requirement for your assemblies to be strongly named if you want to put them in the GAC.
Regards,
Rob Philpott.
|
|
|
|
|
It's a C# windows application using Dll's added by reference, but also dynamically loaded (unmanaged), using reflection. We want to be sure that our project.dll is only used by our project.exe. and vice versa, the other third party dll's are not important.
So no one can replace the exe with his own exe or can replace the dll with his own dll.
For this we made the project.exe strongly named and doing this results in errors on third party Dll's because they are not signed with the key.
i suppose GAC is good for one way check, not both ways ????
Thx
Kurt
|
|
|
|
|
Interesting,
So I guess the assertion is that if you sign an assembly all the assemblies it references must be signed as well. That can't be right??? I'll have to get my Jeffrey Richter book out for that one. Also, you can't use reflection on an unmanaged dll as there is no metadata in traditional DLLs to query. Do you mean interop?
Regards,
Rob Philpott.
|
|
|
|
|
|
|
I would like to post two C# graphic projects (based on GDImage)
but I am not sure of the place to go, inside of "Code project".
Could you give me the good url to use.
Thank you.
Patrice Terrier
www.zapsolution.com
|
|
|
|
|
|
|
Hi
i am working on a desktop applicatioin in which i genrates the pdf files and save them on the disk upto here its fine . Now after saving a file i want to take out the print of that pdf file . i am buliding this application in c# . Can any one tell me the way so that i send that file directly to the printer.
Regards
Atif Khan
|
|
|
|
|
Can you please tell me how to generate PDF from c#
I dont know that.
What have you used?
<marquee>nishu
|
|
|
|
|
IF you dont want to tel me than its ok?
No problem .....
<marquee>nishu
|
|
|
|