| |

VerySource

 Forgot password?
 Register
Search
View: 680|Reply: 3

How to dynamically bind the DataList

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-10 08:00:01
| Show all posts |Read mode
I am doing a product comparison function. On the product comparison page, I need to dynamically bind the data to the DataList based on the passed ID value (and the data must be displayed vertically) because the product parameters may be different (for example, maybe (Comparison between mobile phones or notebooks), binding to DataList fields is not the same, do you know how to solve this problem? I use ASP.NET (C #) language developed
Reply

Use magic Report

0

Threads

64

Posts

45.00

Credits

Newbie

Rank: 1

Credits
45.00

 China

Post time: 2020-6-1 15:00:01
| Show all posts
Do you want to change the header of the Datalist
You can also not use Datalist, according to the data source, you can also dynamically draw Table
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-6-5 21:30:02
| Show all posts
Not the header, I want to dynamically bind the value of each column in the database, I want to do a product comparison function
Like this site
http://product.danawa.com.cn/list/C_1108.html
I have implemented the product display on this page. When I go to another page, I pass the past value. I also got it. I want to use DataList to bind, because only this control can display the bound data in a vertical column. Now I just want to how to dynamically bind each column value to this control, and also add a delete comparison button to it. Which expert please click it. If someone has done it, you can send the source code. Take a look at the best, thank you
Reply

Use magic Report

0

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-6-8 21:45:01
| Show all posts
DataList can draw a list of templates to make a DIV.
ItemDataBind writes div.innerHTML ='XXXX';
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list