Is there a way to do an image array I don't know about?
I need to load images onto the web page dynamicly and before I make a control to do it is there a way already?
Printable View
Is there a way to do an image array I don't know about?
I need to load images onto the web page dynamicly and before I make a control to do it is there a way already?
The literal control allows you to place any html in it. So you could dynamically build html image tags and place them in the literal control's .text property.
You could use the placeholder control and panel control (depending on what you are doing) and create image controls in code and add them to those objects.
Is that what you are thinking?
Yep. I had forgotten that you can add controls to a panel at run time, and so that what the literial control does :)
That solves another problem I was going to have as well displaying html formatted text stored in the db.
Thanks
hellswraith,
I show a confirm page with all a entries realated data from all table. I format it all out in tables. Sometimes I want the table and sometimes i want a one line message "No info...". I am using panels to hide or show one or other depending on the data. Is there another way to do this that doesn't need the panle? Well, I just thought of one. I could build my table in code and use a literal instead of the 3 static contrls. :cool:
I think I'm starting to get my head around all these controls finally.
Not exactly sure, but use the Table control, don't just build a html string. You can just declare a table control, add rows with contain the columns, set all the properties, and add the table control to your panel.
Yeah I'm doing that with a composite control I'm working on. I create the html table and the other control in code and add controls to cells and finally add the table to the actual base control. It'd pretty nice.
I am in the middle of a big project and actual learning ASP.Net so my code is a little jumpy right now, but I think this conversation has actual just given me a complete clear view of how things in asp.net are truely geared to work. I have been working in a half asp half asp.net fashion, that while completely functionl doesn't leverage the full scope and power of the framework. Not bad for my first full fleged asp.net application but the next one will work much more in sync with the framework.
That is the key, just try to keep learning as you go.Quote:
Originally posted by Magiaus
Yeah I'm doing that with a composite control I'm working on. I create the html table and the other control in code and add controls to cells and finally add the table to the actual base control. It'd pretty nice.
I am in the middle of a big project and actual learning ASP.Net so my code is a little jumpy right now, but I think this conversation has actual just given me a complete clear view of how things in asp.net are truely geared to work. I have been working in a half asp half asp.net fashion, that while completely functionl doesn't leverage the full scope and power of the framework. Not bad for my first full fleged asp.net application but the next one will work much more in sync with the framework.
I look back at my first asp.net pages and just chuckle at what I did. (Same goes for all my early .Net work). It takes time to get used to the new stuff.