cancel
Showing results for 
Search instead for 
Did you mean: 

How to execute the Code-Behind of .aspx linked using XML Data Connection

Former Member
0 Kudos

I have a dashboard with a live XML Data Connection tied to a Default.aspx file. That .aspx file has a Default.aspx.vb code-behind file tied to it with some logic in the Page_Load sub routine. If i open the .aspx on my own in the browser, the code-behind executes properly.

However, when I tie the .aspx to my dashboard and launch it I know for a fact the .aspx is being called (i have a placeholder on the dashboard to let me know if it executed or not) but its code-behind file is not. I can't seem to find a solution through Google, would anyone be able to lead me in the right direction with this? My code is as follows:

Default.aspx

<%@ Page Language="vb" aspcompat="true" Debug="true" validaterequest="false" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="scheduleAppointment._Default" %>

<%     
    'tester to see that script executes, this puts "ScriptExecuted" on a label on my dashboard
    Dim sXML As String    

    sXML = "<data><variable name=" + Chr(34) + "Range_0" + Chr(34) 
                  + "><row><column>ScriptExecuted</column></row></variable></data>"
    
    Response.Write(sXML)
    
%>

Default.aspx.vb

Imports Microsoft.Office.Interop
Partial Public Class _Default
    Inherits System.Web.UI.Page


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

            (I have code here creating a Microsoft Outlook appointment and saving/scheduling it. This is not being
             executed when running the dashboard itself, but I know the code works if I run the .aspx on my own
             in Internet Explorer browser)
        
    End Sub

End Class

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Easy fix, apparently code-behind doesn't execute in Preview mode. Exported to .swf and ran in the Internet Explorer browser and it worked.