Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Adding dynamic button

Posted on 2014-02-19
6
Medium Priority
?
291 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Technology Partners: 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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

598 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