whiwex
asked on
Click Events Don't Work After LinkButton Postbackurl
I have a page with a linkbutton that has it's postbackurl pointing to a page that opens a excel
spreadsheet. The spreadsheet works fine but none of the click events work after the spreadsheet is opened. Here's the code for the page tha opens the spreadsheet.
<%@ Page Title="" Language="VB" MasterPageFile="~/Master Pages/Sponsor Program.master" AutoEventWireup="false" CodeFile="Print Excel.aspx.vb" Inherits="Chairman_Sponsor _Program_R eports_Pri nt_Excel" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head " Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Cont entPlaceHo lder1" Runat="Server">
</asp:Content>
Here is the vb code behind
Partial Class Chairman_Sponsor_Program_R eports_Pri nt_Excel
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'CType(Page.PreviousPage, MyPreviousPage).MyPublicMe thod()
Dim fileData() As Byte = System.IO.File.ReadAllByte s(Server.M apPath("~/ temp/spons orsexport. xls"))
Response.Clear()
Response.AddHeader("Conten t-Type", "application/vnd.ms-excel" )
Response.AddHeader("Conten t-Disposit ion", "attachment; filename=""sponsorsexport. xls""")
Response.BinaryWrite(fileD ata)
Response.Flush()
Response.End()
End Sub
End Class
Pleas Help
spreadsheet. The spreadsheet works fine but none of the click events work after the spreadsheet is opened. Here's the code for the page tha opens the spreadsheet.
<%@ Page Title="" Language="VB" MasterPageFile="~/Master Pages/Sponsor Program.master" AutoEventWireup="false" CodeFile="Print Excel.aspx.vb" Inherits="Chairman_Sponsor
<asp:Content ID="Content1" ContentPlaceHolderID="head
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Cont
</asp:Content>
Here is the vb code behind
Partial Class Chairman_Sponsor_Program_R
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'CType(Page.PreviousPage, MyPreviousPage).MyPublicMe
Dim fileData() As Byte = System.IO.File.ReadAllByte
Response.Clear()
Response.AddHeader("Conten
Response.AddHeader("Conten
Response.BinaryWrite(fileD
Response.Flush()
Response.End()
End Sub
End Class
Pleas Help
I think it is Excel's security feature which is disabling click and other features. Excel shows an "Enable" button under the toolbar which user has to click to enable all features.
ASKER
It's the controls on the web page that are not firing not excel.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I figured it out