C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

Dynamic Controls


Posted Date: 29 Aug 2008      Posted By: Ajay      Member Level: Silver     Points: 1   Responses: 2



Hi,
I've a dynamic Htmltable with some controls like button,checkboxes,textbox and radio button. By default all the controls will be displayed except the check boxes. I have to display the checkboxes on the button click event.

Let's say I have five rows in the table.
When I click on the button in the first row the check boxes in the first row needs to be displayed likewise the rest.

Please give me any solution for this like how to trigger the event of the dynamic control and how to capture which button is clicked.





Responses

Author: Praveen    29 Aug 2008Member Level: DiamondRating: 2 out of 52 out of 5     Points: 5

see maintain a html hidden input type with that write javascript to load the value of that hidden input. at the time of your dynamic creation of your control button.Attributes.Add("onclick","ButtonClick(this.id);"); write like this then all the buttons will load at ur javascript load that id in to ur html hidden and inur cs you'll get the button which the user clicked then u regenerate controls again and at appropriate buttonclick field add checkbox

hope this information give some idea to you.



Author: karthik    29 Aug 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 3

Hai,

when the page load all the check box also loaded with Visible property as false. When button click using javascript set the visible property as true.



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Very useful for all (Dynamic creation of textbox,button etc in asp.net 2005)
Previous : .NET
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use