TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Gary King
NA
83
209.4k
TreeNode - How can I add a control (LinkButton)?
Jan 27 2011 11:38 AM
I am creating a TreeView dynamically in code behind and currently it only contains text (taken from database).
What I want to do is display the text (as I am currently doing) and add a LinkButton at the end. If the user clicks on the text of the node (eg "Red" in the example below), then the browser is re-directed to another page. If the user clicks on the LinkButton text ("Delete") then a function is called that deletes the associate record in the database.
So, for example (the "Delete" is the LinkButton):
- Colours
- Red
Delete
- Green
Delete
- Blue
Delete
The way that my existing code (without Delete) works is that I have a DataReader that gets the values (Red, Green, Blue) from the database and creates a child TreeNode with the
.Text
value being the current value. I also set .
NavigateUrl
to another page (so I cannot use NavigateUrl to perform the delete)
Is it possible to add a LinkButton, or are there any suggestions as to alternative approaches?
Reply
Answers (
4
)
List of Application in Applications Tab in Task Manager
how to using office interop for excel