CFanatic

Go Back   CFanatic > Programming > C# Programming

Join CFanatic Forum Now

Adding Buttons to ASP Table rows in c#/ASP.NET topic posted under C# Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 09-02-2010, 10:23 AM
Junior Member
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
croker10 is on a distinguished road
| More
Adding Buttons to ASP Table rows in c#/ASP.NET

Hi all,
I am trying to create a table of user created filters for a data set and then display the filters in an ASP:Table. Displaying the filters works fine, and I have no problem there. The issue I am having is that the buttons I am trying to add are not adding in the way I think they should.

I am setting the ID, Text, and OnClick events in my code behind in C#, but when I debug and view the source, the values have all been changed, and I can't understand why.

The buttons need to be added, being called "buttonX" where X is the row number the button is in, so I can distinguish later to remove filters if the user clicks on them.

If you think any other code would be helpful to figuring this out, I'd be happy to supply.

Please let me know if you have any ideas, the code behind is here:

Code:
 {
       Button b = new Button();
       b.OnClientClick = "delete_Item";
       b.ID = "delete" + count;
       b.Text = "Remove";
       b.Click +=new EventHandler(delete_Item);

       TableCell temp = new TableCell();
       temp.Controls.Add(b);

       r.Cells.Add(temp);

       filters.Rows.Add(r);

       count++;
}
And the html output is:


Age Range25 - 36

Last edited by shabbir; 09-02-2010 at 11:36 AM. Reason: Code Blocks
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating rows of asterisks??? wakesin C++ Programming 0 09-01-2010 03:31 PM
C program to construct a divided difference table newton_LA C Programming 0 08-28-2010 03:11 AM
C program to construct a divided difference table newton_LA C Programming 0 08-28-2010 03:11 AM
Using CMFCVisualManager to change style of buttons and background of a CFormView pengCC MFC Programming 0 08-28-2010 02:24 AM
Toolbar help: How to make buttons dynamic using images Echelo Win32 Programming 1 08-27-2008 04:32 AM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 03:34 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board