[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Using the ajax tab feature

Posted on 2008-06-10
1
Medium Priority
?
241 Views
Last Modified: 2013-11-26
I am developing a form using the ajax tabs and update panels to prevent postbacks. My main problem is this: When a user enters his or her last name into the text box and clicks the submit button all is well until I go to another tab where there is a dropdown box containing the last names is displayed, but because I am avoiding the postback, the dropdown box does not contain the newly entered last names. I have a Sub routine that loads the last names on page load, but if I add it to the button click event, the data is loaded again; therefore, displaying it twice. How do I get the data to only refresh the new last name without adding duplicates to the dropdown box? I am pretty sure that I should use an if statement, but I am not sure where to put it or how to construct.

Thanks
0
Comment
Question by:cyberSteveG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
cwickens earned 800 total points
ID: 21823575
Without a postback to the server, the newly entered names dont get retrieved from the DB, you could add a DataBind() to your submit button that would DataBind the the names list (gridview, detailsview or whatever is holding the list).  If you put all of it inside an updatepanel, you would not have a full page refresh either...

hope this helps,
c
 Protected Sub btn_submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_submit.Click
        'Dim your list of names container
        Dim myGridview as GridView = Me.GridView1
       
        'Do your submit code
        myGridview.DataBind()
 
    End Sub

Open in new window

0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question