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
zseth
NA
1
0
choosing user controls dynamically at runtime
Nov 25 2003 10:18 PM
I am trying to dynamically choose from a selection of user controls at runtime. Based on a specified id field, I want to load the related control which will specify how to format some data passed up through the application. It's for a CMS and i'm trying to dynamically update the attributes for different types of content (ie. an image might have 'src', 'width', 'height'... and a link might have 'href', 'title', 'link text'... and paragraph will just have 'text') I've tried to use the asp:placeholder control to do this with a code behind switch-statement but the placeholder's OnDataBinding causes a nullReferenceExeption which i haven't been able to solve. The only other way i can think of doing this is by outputting the data in a preformatted string but this is a clumsy and inelegant solution, and i won't be able to use the data for updates. any ideas how to get around this (prefferably with the placeholder)???
Reply
Answers (
0
)
Custom error page when accessing unauthorized page
Dynamic hyperlinks - how do i get rid of underline?