Composite controls

  • Thread starter Thread starter mpraneetha
  • Start date Start date
M

mpraneetha

Hello Everyone,

i am creating a compostie control (for web)...which would contain a
button "GenerateFile" on click of that button..i should generate a file
(which is not a problem) and also send it to the client so that he can
open/save from the webpage the control is contained in .

if i was doing this in normal web application..i would
response.redirect to an other page..which would contain the code to
open it..it would contain response.appendheader and i would do
response.outputstream which would open a dialog box asking user ifthey
want to open or save the file.

but i am not sure how to do this from composite control...any ideas?

Thanks
 
Your composite control can emit the headers (ContentDisposition) and then
the file itself (via Response.ResponseStream) and then call Response.End
in the event handler that's supposed to generate the file.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
thanks brock.

but the Response object is not availabe in my composite control...can u
show me little code..please

thanks
 
but the response object is not available...if you dont mind..can u
please show some code..or link that explains it.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top