?
Solved

Adding dynamic button

Posted on 2014-02-19
6
Medium Priority
?
286 Views
Last Modified: 2014-03-07
Hi,

I currently loop through a dataset and set out a table as follows:

 For Each dv2 As DataRowView In DvTheData2
                test1.Text += "<tr><td>" & dv2.Row.Item("Thematch") & "</td>" & colourcodeit(dv2.Row.Item("HAG"), "") & colourcodeit(dv2.Row.Item("AAG"), "") & colourcodeit(dv2.Row.Item("VAG"), "") & "</tr>"
            Next

Open in new window


I would like to add a button to the table with the value on Thematch -> this way i can add the match to my database to save later

The code would look something like this

 For Each dv2 As DataRowView In DvTheData2
                test1.Text += "<tr><td>" & dv2.Row.Item("Thematch") & "</td>" & colourcodeit(dv2.Row.Item("HAG"), "") & colourcodeit(dv2.Row.Item("AAG"), "") & colourcodeit(dv2.Row.Item("VAG"), "") & "<td>THEBUTTONGOESHERE</td></tr>"
            Next

Open in new window



How can i do this?
0
Comment
Question by:runnerjp2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39870474
Do you want it to be a html input control and then handle it using Javascript?
0
 

Author Comment

by:runnerjp2005
ID: 39870604
Thats not something i have looked into... how would that work?
0
 

Author Comment

by:runnerjp2005
ID: 39870606
basicly its just button click....add row to database
them if button is clicked again remove from database
0
Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39870695
Where is this html rendered to?
0
 

Author Comment

by:runnerjp2005
ID: 39870743
i label on the from page
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1500 total points
ID: 39874172
You can create a javascript function which can call your code behind to do the database option. Then produce the html button control so that it calls the javascript function and passes the row information to it.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

752 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