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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:55:15+00:00 2026-05-26T22:55:15+00:00

I am using a datalist on customer page to list all customers. There is

  • 0

I am using a datalist on customer page to list all customers. There is a page named “view” where I want to show the details of the particular selected customer. Here is the image button code:

 <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# GetImageURL(Eval("image")) %>' PostBackUrl='<%# Eval("id", "view.aspx?id={0}") %>'/></tr>

id is the unique field of the customer table. Now how should I retrieve the customer data on view.aspx, using the particular ID passed from the customer page. I use this code but it’s not working:

   Dim mycommand As New SqlCommand("SELECT * FROM customer where id = @id", con)
    Int(ID = Request.QueryString("id"))
    con.Open()
    ProfileData.DataSource = mycommand.ExecuteReader 
    ProfileData.DataBind()
    con.Close()

I just want to do that. In the customer page all customers are displayed with their image and when I click on any one of them then the details of the particular customer should be displayed on view.aspx page ..

  • 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-26T22:55:16+00:00Added an answer on May 26, 2026 at 10:55 pm

    you are using @id as CommandParameter to add this id as value to command parameter..
    as

    Dim mycommand As New SqlCommand("SELECT * FROM customer where id = @id", con)
       mycommand.Parameters.Add("@id", SqlDbType.Int)
            mycommand.Parameters("@id").Value = Convert.ToInt32( Request.QueryString("id"))
    
        con.Open()
        ProfileData.DataSource = mycommand.ExecuteReader 
        ProfileData.DataBind()
        con.Close()
    

    check these link to know about the parameter..

    http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.parameters.aspx

    http://msdn.microsoft.com/en-us/library/yy6y35y8%28v=vs.80%29.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am using a datalist to show the product details. In this time i want
I have build a web application which shows the list of customers using datalist
I am using DataList control to show three products per line horizontally. But there
In my asp.net I am using Datalist in that I want to limit row
I'm creating a page that uses Linqfor data access and I'm using DataList to
I'm using a datalist with Ajax pagination and the first page loads fine, showing
I am working on a real estate website and I am using a datalist
Using a populated Table Type as the source for a TSQL-Merge. I want to
Using the Redis info command, I am able to get all the stats of
I am using datalist to display data from the database,I have got three fields

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.