views:

23

answers:

1

I have two links in my aspx page.

one link "A" when i click it ...it is downloading some document when i click it other link "B" when I click it ....it redirects me to some other page.

Both links triggers function from code behind. Both links works fine when i first come onto page but when i click A it shows me message to download it "open" "save" "cancel"

problem is when i click cancel I remain on the same page but now no links work neither link A nor link B.

I guess there is some problem with the state my page is in . How i can avoid this? Code so far:

<asp:Linkbutton ID="linkbutton1" runat="server" Text="A" onClick="Codebehindmethod" />
<asp:Linkbutton ID="linkbutto2" runat="server" Text="B" onClick="Codebehindmethod1" > 
A: 

How are you sending the document to the client?

Is your code in the event handler similar to this?

Response.Clear();
Response.ContentType = mimeType;
Response.AddHeader("content-disposition", "attachment; filename=foo." + fileNameExtension);
Response.BinaryWrite(renderedBytes);
Response.End();
Raj Kaimal
Yah I am using that with Response.ClearHeaders();Response.ClearContent();
TLLL
but i think this is not the rite way and this is the cause of problem but don't know how to fix this
TLLL