Solved

Using the ajax tab feature

Posted on 2008-06-10
1
239 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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

724 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