asp.net != webforms. asp.net only services requests with a response. webforms is an html engine.
the idea/reason of webforms is to create an html engine that behaves like the windows desktop environment (statefullness, events, life cycle). It allows desktop devs to work in the web environment without understanding the web environment.
If you think asp is not a good environment to work in, or know of a better one, I am all ears.
opinions vary. personally I cannot stand webforms. I favor Monorail (no need to switch to MS MVC yet).
The last time I used labels as my control to fill in RSS feed information. When I tried to insert HTML in a label it would display the HTML information not in HTML format.
you are using an html for to render non-html data. (RSS is XML, not HTML). this would be better suited for a custom HttpHandler (IHttpHandler) where you define the output using HttpContext.Resonse.Write("...");
that said, you can send raw html via a webforms Page with a literal control. However this sort of defeats the purpose of webforms.
I consider this code a problem
Code:
mytr.attributes.add("class","YourCSSClassNameHere")
define the classes in the html, not the server code. You can dynamically load the CSS files to define what the class means, if necessary. (google for more information)
all the code behind should do is pass data to the html markup. nothing more, nothing less.
want to create something similar to wordpress
why reinvent the wheel? there are numerous blog engines already available.
Jason Meckley
Programmer
Specialty Bakers, Inc.
faq855-7190