Build PhoneMenu object with Database Entries

Unanswered Question
May 7th, 2008

I am designing an ASP page that uses a library to generate XML phone objects. I want to dynamically create a PhoneMenu object using names retrieved from a database. However, when I open the connection to the database, the XML does not display on the phone.

Any ideas would be greatly appreciated.

Kind Regards,

Michael Smith

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
agiaccone Wed, 05/07/2008 - 10:24

Paste some code snippet so that we can have a look at the part which doesn't work.


developer_mike_smith Wed, 05/07/2008 - 10:44

Thank you so much for the reply! Here's a snippet of the class I'm using...

Partial Public Class _Default

Inherits System.Web.UI.Page

Dim a As New SqlClient.SqlConnection("Data Source=;Initial Catalog=PhoneTest;Integrated Security=True")

Dim _names As ArrayList

Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init


' Note: If the above line is commented out, it works fine on the phone...

End Sub

Private Sub FillArrayList()

Dim DA As New SqlClient.SqlDataAdapter("SELECT * From Employees", a)

Dim DT As New DataTable


For Each dr As DataRow In DT.Rows





End Sub

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

Response.ContentType = "text/xml"

' Testing PhoneText object

'Dim t As Cisco_Handler.CiscoIPPhoneServices.CiscoIPPhoneText = New CiscoIPPhoneText("IP Phone Service", "Button Configuration...", "Developed By M. Smith")

't.AddSoftKey(New Cisco_Handler.CiscoIPPhoneServices.CiscoSoftKey("Button1", "", 1))

't.AddSoftKey(New Cisco_Handler.CiscoIPPhoneServices.CiscoSoftKey("Button2", "", 2))

't.AddSoftKey(New Cisco_Handler.CiscoIPPhoneServices.CiscoSoftKey("Button3", "", 3))

't.AddSoftKey(New Cisco_Handler.CiscoIPPhoneServices.CiscoSoftKey("Button4", "", 4))

' Test PhoneInput Object -- Works Fine

'Dim t As New CiscoIPPhoneInput("Title1", "prompt", "")

't.AddInput("Display1", Cisco_Handler.InputFlags.A)

' Testing Phone Menu

Dim t As New CiscoIPPhoneMenu("My IP Service Main Menu", "Choose Selection:")

t.AddMenuItem(_names.Item(0).ToString, "")

t.AddMenuItem(_names.Item(0).ToString, "")

' Send objec to phone..


End Sub

End Class

I greatly appreciate your help,


agiaccone Wed, 05/07/2008 - 23:46

If you try to display the output with internet explorer what do you see ?

If nothing is displayed, maybe your AddMenuItem method could have some error in formatting xml..

developer_mike_smith Thu, 05/08/2008 - 05:22

If I open the page in IE, it displays the properly formatted XML as it should (including the database entries as buttons) . If I were to comment out the line that reads '' everything displays correctly on the phone (except for the names being generated from the database; which comes from the following line: t.AddMenuItem(_names.Item(0).ToString, "") )

I'm unclear why connecting to a sql server instance prevents the XML from displaying on the phone.

Any insight would be greatly appreciated.




This Discussion