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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:49:18+00:00 2026-05-24T07:49:18+00:00

Seems to be a trivial problem, but can’t pinpoint a solution. I have a

  • 0

Seems to be a trivial problem, but can’t pinpoint a solution.

I have a drop down bound to a datatable. I’m trying to insert a new item at position 0, but when the control is loaded, I don’t see the new listitem or any errors.

Public Sub Page_Load(ByVal sender As Object, ByVal e As eventargs) Handles Me.Load
    If Not Page.IsPostBack Then
        loadRegistrantAbstracts()
    End If
End Sub
Public Sub loadRegistrantAbstracts()
    Dim obj As New Lookups
    Dim dtAbstracts As DataTable

    dtAbstracts = obj.getAbstracts()

    If dtAbstracts.Rows.Count > 0 Then
        With ddlAbstracts
            .DataSource = dtAbstracts
            .DataTextField = "DisplayName"
            .DataValueField = "AbstractID"
            .DataBind()
            .Items.Insert(0, New ListItem("Select Abstract..", "0"))
        End With
    End If
End Sub
  • 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-24T07:49:19+00:00Added an answer on May 24, 2026 at 7:49 am

    The answer, thanks in part to HardCode, was the following:

    Public Sub Page_Load(ByVal sender As Object, ByVal e As eventargs) Handles Me.Load
        If Not Page.IsPostBack Then
            loadRegistrantAbstracts()
        End If
    End Sub
    Public Sub loadRegistrantAbstracts()
        Dim obj As New Lookups
        Dim dtAbstracts As DataTable
    
        dtAbstracts = obj.getAbstracts()
    
        Dim row As DataRow = dtAbstracts.NewRow
    
        row("DisplayName") = "Select Abstract..."
        row("AbstractID") = "0"
    
        dtAbstracts.Rows.InsertAt(row, 0)
    
        If dtAbstracts.Rows.Count > 0 Then
            With ddlAbstracts
                .DataSource = dtAbstracts
                .DataTextField = "DisplayName"
                .DataValueField = "AbstractID"
                .DataBind()
            End With
        End If
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like such a trivial problem, but I can't seem to pin how
I have problem that seems to be rather trivial but I was not able
It seems like a trivial problem, but nothing I've tried will make the background
Ok, the problem should be trivial but I can't get to the bottom of
This seems trivial, but I've never had to worry about it before and my
This seems to be a trivial question but I got hung on it for
I know this seams a trivial question, but how can I disable the annoying
This seems like such a trivial question to ask, but it's been vexing me
I'm currently working on a project Euler problem (www.projecteuler.net) for fun but have hit
While I have the problem itself seemingly resolved, I'm hoping someone can shed some

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.