I need to download a text file containing data from my current page, this by a click on an asp:button.
so I used on my current asp page an ajax method to send the required data as ajax params to another aspx page which is responsible for the creation of the text file,
so :

Solution 1

What do you think AJAX is ? It's a way to get data back to the client without a refresh . You can't download a file without a full page request, but if your request sends back a file, the page won't change, it will just ask the user to save. If you do an AJAX request, you can't do a Response.Redirect. You're not handling a full page request to start with. You need to get rid of the redirect ( which is also invalid if you're sending a file as the response ) and make this not an AJAX call.

Christian,
Wow. Just wow.
You started your answer by ridiculing him and expect him to read your answer carefully. He replied back saying he's new in AJAX development. I can see you are a programming genius but some etiquette can go a long way. and who said anything about money??? Wow. Just wow.

I just can not believe how rude you are ! we're not to blame each other for our mistakes but to correct them together, you know! pardon my ignorance but i thought this is why i'm here, to find someone helping me with that !

Yeah, it's largely why I stopped answering, too. People are not interested in help, or direction, they mostly want their work done for them, and get upset when asked to understand something or think or write code.