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 1039523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:06:37+00:00 2026-05-16T15:06:37+00:00

This is in ASP.NET. We are using a ExtJS frontend, and have our own

  • 0

This is in ASP.NET. We are using a ExtJS frontend, and have our own VB.NET controls to make all the Ext Forms and stuff. However, I hope this can be done in plain javascript. There is already some Javascript on the page for the ‘Test Connection’ button click and handling the result.

However, I need validation on the screen to make sure that a user tests the connection BEFORE saving the screen. (Hits the test button before hitting the save button) — EACH time they visit the screen.

Here is the code for the page:

<%@ Page Language="VB" Inherits="Core.Web.EditBaseView" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script language="javascript" type="text/javascript">
        function testConnection() {

            Global.mask('Testing Connection...');
            KBBConnectorController.TestConnection(function(result) { testConnectionCallback(result) });
        }

        function testConnectionCallback(result) {
            Global.unmask();
            if (result.Data.Result) {
                Global.alert("Connection to KBB Successful.");
            }
            else {
                Global.alertError(result.Data.Messages[0].Text, result.Data.ExceptionId);
            }
        }

        function Validate() {

        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="display:none">
        <%  =Html.DropDownList("ddlMarketValues", TryCast(Model.MarketValues, SelectList))%>
    </div>
    <div>
        <%
            Using KBBForm As New WebControls.Forms.Form
                With KBBForm
                    .OnValidate = "Validate"
                    .ID = "KBB"
                    .ItemName = "connector"
                    With .Toolbar
                        .UseDefaultButtons = False
                        .AddButton(Forms.FormToolbar.ButtonType.Save)
                        .AddButton(Forms.FormToolbar.ButtonType.Cancel)
                        .AddButton("Test Connection", "testConnection", "icon-button-testconnection", , "Test connectione")
                    End With

                    With .CenterRegion
                        .Id = "centerRegion"
                        With .AddFieldSet("Activate Service")
                            .Id = "activate"
                            .LabelWidth = 0
                            Dim cb As New Forms.Control("IsActive", "", "", Model.IsActive, Forms.Control.ControlType.CheckBox)
                            cb.BoxLabel = "Activate Service"
                            .AddControl(cb)
                        End With

                        With .AddFieldSet("Connection Parameters")
                            .Id = "params"
                            .LabelWidth = 150
                            .AddControl(New Forms.Control("UserName", "", "User Name", Model.UserName, Forms.Control.ControlType.TextField))
                            .AddControl(New Forms.Control("Password", "", "Password", Model.Password, Forms.Control.ControlType.Password))
                            .AddControl(New Forms.Control("LoginUrl", "", "URL", Model.LoginUrl))
                            With .AddControl(New Forms.Control("ddlMarketValues", "", "Market Value", , Forms.Control.ControlType.ComboBox))
                                .Id = "ddlMarketValues"
                            End With
                        End With
                    End With
                    Response.Write(.ToString)
                End With
            End Using
            %>    
    </div>
    </form>
</body>
</html>

As you can see I put an OnValidate function in there but it’s blank, and you can see that it’s tied to the Form as well. I tried fooling around with that but I could only put something together that would ask me to test every single time I clicked Save, and it wouldn’t know if I already tested or not.

Any help? Thanks ahead of time.

-Scott

  • 1 1 Answer
  • 1 View
  • 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-16T15:06:38+00:00Added an answer on May 16, 2026 at 3:06 pm

    Uh, this should work if I did understand you correctly.

    1. In the code which handles the result of the connection test, set a flag that indicates that the connection has been tested.
    2. In the handler of the Save button check for that flag, and if it’s not set display a message of some kind instead of actually performing the saving operation.

    Your flag could be global variable which is initially set to false this way the user would be required to run the test each time the visit the page.

    As on how you would override/intercept the Save buttons handler… uh… guess you’ll have to extend the VB stuff for that.

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

Sidebar

Related Questions

I'm working on an ASP.NET page, using VB.NET and I have this hierarchy: Page
This is nuts. I have an ASP.NET MVC application using Windows authentication that, amongst
My current position is this: if I thoroughly test my ASP.NET applications using web
Using asp.net MVC I'd like to do this inside a view: <%= Html.TextBox(textbox1, null,
I know this site is written using ASP.Net MVC and I do not see
I am using ASP.NET to transmit a .jar file. This code works perfectly on
I'm using Lucene.Net in an ASP.NET application on a shared host. Got this stack
I am using MS AJAX ASP.NET Components (Calendar Extender) and I'm finding this problem.
I'm using a ASP.NET menu control. I'd like the menu to look like this,
I'm using a ExtJS DateField control in an ASP.NET MVC web application. I've set

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.