Solved

Using the ajax tab feature

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Online file editor, manager 6 59
vb.net 2 37
How do ASP.NET and MVC work together? 4 27
Problem to error 4 43
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now