Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3982234
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:30:15+00:00 2026-05-20T05:30:15+00:00

Hi I have a simple aspx file with 2 text boxes and an ajax

  • 0

Hi
I have a simple aspx file with 2 text boxes and an ajax autocomplete extender attached to textbox2

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test4.aspx.vb" Inherits="test4" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<form id="form1" runat="server">
<div id="content">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:TextBox ID="TextBox1" runat="server">
    </asp:TextBox><br />
    <asp:TextBox ID="TextBox2" runat="server">
    </asp:TextBox>
</div>
<asp:AutoCompleteExtender ID="load_textBox2" TargetControlID="TextBox2" ServiceMethod="GetModelName"
    UseContextKey="True" runat="server">
</asp:AutoCompleteExtender>
</form>
</body>
</html>

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

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
<WebMethod()>
Public Function GetModelName() As String()
    Return mod_name
End Function

End Class

This not working.. How can i make it work???.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:30:15+00:00Added an answer on May 20, 2026 at 5:30 am

    Your function should be shared:

    <WebMethod()>
    Public Shared Function GetModelName() As String()
        Return mod_name
    End Function
    

    Check that EnablePageMethods="true" in the script manager tag.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple aspx file <%@ Page Language=VB AutoEventWireup=false CodeFile=test4.aspx.vb Inherits=test4 %> <!DOCTYPE
I have this simple ASP.NET page here: <%@ Page Language=C# AutoEventWireup=true CodeBehind=Tree.aspx.cs Inherits=CoconutTree.One %>
I have a simple aspx page with a few TextBoxes and a submit button.
I have an Asp .net page like this simple one http://issamsoft.com/app2/page1.aspx and I want
Let's assume I have a simple XML file: <data> <text>Hello world!&lt;br&gt;Nice to see you
If I have a simple aspx page and I add some labels and textboxes
I have a simple function GetPageName(String PageFileName, String LangCode) defined inside a class file.
I have tried running a simple html file which includes a jquery.js file with
I have the following issue. I have an aspx file upload input that must
I have a winForm application that generates an .aspx file based on the user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.