title: calling vb pagemethod from ajax
body: <p>Hi
  I have a simple aspx file with 2 text boxes and an ajax autocomplete extender attached to textbox2</p>
  
  <pre><code>&lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="test4.aspx.vb" Inherits="test4" %&gt;
  
  &lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;body&gt;
  &lt;form id="form1" runat="server"&gt;
  &lt;div id="content"&gt;
      &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
      &lt;/asp:ScriptManager&gt;
      &lt;asp:TextBox ID="TextBox1" runat="server"&gt;
      &lt;/asp:TextBox&gt;&lt;br /&gt;
      &lt;asp:TextBox ID="TextBox2" runat="server"&gt;
      &lt;/asp:TextBox&gt;
  &lt;/div&gt;
  &lt;asp:AutoCompleteExtender ID="load_textBox2" TargetControlID="TextBox2" ServiceMethod="GetModelName"
      UseContextKey="True" runat="server"&gt;
  &lt;/asp:AutoCompleteExtender&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What i am trying to do is to call the pagemethod "GetModelName" form the aspx.vb to fillup the textbox2 with the relevent data
  This is the aspx.vb code</p>
  
  <pre><code>Imports System.Web.Services
  
  Partial Class test4
  Inherits System.Web.UI.Page
  Dim Model_Name_old As String()()
  Dim mod_code As String()
  Dim mod_name As String()
  Dim cod_upper As Integer
  
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      //calling webservice that retunrs a jagged array
      Dim ins As New localhost_insert_model.dbModel
  
      Model_Name_old = ins.get_Model_Name("A")
  
      mod_code = Model_Name_old(0)
      mod_name = Model_Name_old(1)
      cod_upper = Model_Name_old(0).GetUpperBound(0)
  End Sub
  &lt;WebMethod()&gt;
  Public Function GetModelName() As String()
      Return mod_name
  End Function
  
  End Class
  </code></pre>
  
  <p>This not working.. How can i make it work???. </p>