|
Can't you set the new name in the Content-Disposition header?
Check out a quick example here: http://support.microsoft.com/kb/260519[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Yes I guess this is an option. This is exactly the same code that I use to output an Active Report to the user. It does of course invoke a postback though and additional processing. Can you see any issue with this? Any other options?
Presumably I would need to load the file in my code into say a memory stream?
|
|
|
|
|
Sam Heller wrote: I would need to load the file in my code into say a memory stream
How about response.writefile or response.transmitfile rather?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hmm the original method you suggested seems to work fine. The only problem is I won't be able to do this from inside an update panel. Any suggestions?
|
|
|
|
|
Further to this the content disposition method can't handle white space in the file name. I have been forced to run a quick replace to turn them all into underscores. Not ideal but I can live with it? Any suggestions to allow whitespace?
|
|
|
|
|
Sam Heller wrote: the content disposition method can't handle white space in the file name
No. I think it takes it. Did you try escaping them and sending it to the web browser?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
How would you escape the spaces in this way. If I have;
Response.AddHeader("content-disposition", "attachment; filename=" + ThisFile.FriendlyName)
Thanks
|
|
|
|
|
Sam Heller wrote: update panel
AJAX control?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Yeah the ajax control known as the updatepanel. It doesn't allow the write though and errors.
|
|
|
|
|
I need to locate all the SQL servers and their databases on the all the computers in the domain of my company. How to do that. Plz help.
Thanks
|
|
|
|
|
Hi
Use, Sql Management Objects(SMO).
Check here[^]
modified on Wednesday, May 28, 2008 9:55 AM
|
|
|
|
|
|
hello
how to delete nodes in treeview?
Can we enable scrooling in treeview if yes how?
|
|
|
|
|
meghamaharshi wrote: Can we enable scrooling in treeview if yes how?
I think we can not able to scoll treeview but there are many ways.
Put tree view in div tag,fix division height and width and set overflow style as scroll.
please don't forget to vote on the post that helped you.
|
|
|
|
|
No you cant enable scrolling in treeview
How do you mean delete nodes?
Do you mean on the fly?
We are not a Code Charity
|
|
|
|
|
i want to delete selected node
|
|
|
|
|
http://www.google.co.uk/search?hl=en&q=delete+treeview+nodes&btnG=Google+Search&meta=
We are not a Code Charity
|
|
|
|
|
i am using asp.net +c#. In my form i use gridview in that i use two dropdownlist one filled with country and other filled state.When i select county in one dropdownlist the second dropdownlist display corresponding state.how can i do this i am biginer in asp.net.i tried it lot but i cant get the answer.If anyone know this answer pls give the code also.
|
|
|
|
|
deepthy.p.m wrote: i tried it lot but i cant get the answer.
On RowCreate event of Gridview,Find country Dropdownlist control,create an instant,create selectedIndexChanged event country dropdownlist and set Autopostback event true.Whenever you change index of dropdownlist,that event will fire,you can get states of selected counrty on that event
please don't forget to vote on the post that helped you.
|
|
|
|
|
deepthy.p.m wrote: know this answer pls give the code also.
What have you tried? Post some code so we can help you
|
|
|
|
|
Hi,
As iam getting an error called "InvalidOperationException was unhandled by the usercode","Both DataSource and DataSourceID are defined on 'GridView1'. Remove one definition"....Can anybody help me regrding this.
Regards,
Sami.
|
|
|
|
|
You have already written the answer
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Remove one of the definitions...
|
|
|
|
|
My question is based on Intranet application.
There is a machine by the name of machine1 where i hosted the intranet application.
Now from machine2 which is attached with machine1 intranet application(virtual directory), i am trying to access the intranet application aspx page.This is working very fine.Even there is no shared folder on machine1.Simply , the windows firewall is off.
But when i try to access those pages programatically , it says Access not denied.
Please help
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Any password protections ?
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|