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

  • SEARCH
  • Home
  • 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 8283345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:42:10+00:00 2026-06-08T10:42:10+00:00

I am not sure how difficult this is but I have checkboxList with value

  • 0

I am not sure how difficult this is but I have checkboxList with value that is being populated from the database.

This is the markup:

<asp:CheckBoxList runat="server" ID="sects">

The fieldname is doclist and I read the values into this:

While objReader.Read()
  With objReader
    Dim li As New ListItem(objReader(0).ToString())
    sects.Items.Add(li)
  End With
End While

It works great so far. Thanks in large part to the great help I get here.

However, we would like to have values associated with the sects.Items.Add(li) concatenated into a url.

The following is the url:

http://default.html and we would like to concatenate it so it looks something like this:

http://default.html?parts="+sects.Items.Add(li)+"&docs=answers&name=meter.zip"

This doesn’t work. I get an error, “this does not produce a value

What we are trying to accomplish is to populate the checkboxList with url string containing the sects values within that url.

Any ideas how to get this to work?

Sorry guys I just keep coming back for more. I do try to fix first though before coming here.

  • 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-06-08T10:42:12+00:00Added an answer on June 8, 2026 at 10:42 am

    Ok, I think I understand better. I have removed the link button and I have altered the list items so the the text shown is a URL that contains the database field in it, as a URL parameter. The value remains the database field by itself. But if I may ask, what kind of design is this? It looks very shaky. Can you navigate to these pages with distinct data rendered? You want to allow multiple selections, but how can you take that into account by going this route. And if you don’t want the user to be able to have multiple selections, you should use a drop drown list instead. I hope this works for you, but I am looking skeptically at the logic behind this requirement and its implementation.

    Markup:

    <asp:CheckBoxList runat="server" ID="sect" CssClass="checkAll" AutoPostBack="true" >
    </asp:CheckBoxList>   
    

    Code Behind:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim strSQL As String = "SELECT AppealNumber FROM Appeals"
            Dim connStr As String = ConfigurationManager.ConnectionStrings("connstr").ConnectionString
            Dim conn As New SqlConnection(connStr)
            Dim cmd As New SqlCommand(strSQL, conn)
            Dim objReader As SqlDataReader
            conn.Open()
            objReader = cmd.ExecuteReader()
            '   |||||   Loop through the Reader to retrieve data    
            '   |||||   and set each checkbox to appropriate data from datasource
            While objReader.Read()
                With objReader
                    Dim li As New ListItem("Default.aspx?parts=" + objReader(0).ToString(), objReader(0).ToString())
                    sect.Items.Add(li)
                End With
            End While
        End If
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure how difficult this but I have an array and would like
I'm not sure it's an acceptabale question for Stackoverflow but I have difficult time
Not sure how to ask this, but i'll give it a try: I have
I have something that I would like to do, but I am not sure
This is probably not a difficult project, but I'm not sure of the best
not sure why I find this so difficult. Here is the html code: <tr>
Not sure if im just being stupid or something but here goes i work
Not sure if this is a big deal. But wondering why when the site
This is a kind of difficult one to explain but basically I have a
I don't have much experience with javascript so I' not sure if/how this can

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.