Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-29-2013, 01:25 PM   PM User | #1
bdenny20
New Coder

 
Join Date: Jan 2013
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
bdenny20 is an unknown quantity at this point
Displaying XML with ASP.NET

Hello again,
I said in my first post that I would be back when I find myself stuck again, well...I'm stuck again.

Kind of at least. I haven't gotten to the point of being stuck since I need a point in the right direction first.

My project is pretty big for a first time go at. I've been studying many different aspects of coding at once...C#, VB, Razor, Javascript, CSS, jQuery, XML and ASP.NET to be precise. My head is swimming, but in a good way. This is fun.

Now, enough of that. My next goal is finding the best way to go about displaying XML as HTML. In my ASP.NET studies, I've read about the neat @render function to create layout pages. It was a big step in the right direction. I'm trying to find a way to play off that.

A big part of my project is a database of articles. Each article shares the common sections 'title,' 'date,' 'author,' 'category,' and 'content.' I'd like to create an article layout page, then have it refer to a particular XML sheet for each article and replace the corresponding divisions on the layout page with the correct sections of the article.

I'm not sure if this makes sense here, I can see it in my head though. Is there some way to make a @render type function pull information from the XML and place it in it's correct spot on the page?

I just recently heard about XSLT, but I do not know enough about it yet to know if this will be useful. I will continue my reading in the meantime.

Any feedback, or a friendly point in the right direction will be greatly appreciated.

Thanks,
Bill
bdenny20 is offline   Reply With Quote
Old 01-29-2013, 04:58 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,491
Thanks: 18
Thanked 361 Times in 360 Posts
sunfighter is on a distinguished road
bdenny20 trying to learn more then one coding program at a time will make you the proverbial "Jack of all trades, master of none".

Go here to learn xsl and xml for that matter.
http://www.w3schools.com/xsl/xsl_languages.asp
sunfighter is offline   Reply With Quote
Old 01-29-2013, 06:41 PM   PM User | #3
bdenny20
New Coder

 
Join Date: Jan 2013
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
bdenny20 is an unknown quantity at this point
Ha, right?
Probably not the best approach, but every time I start reading up on something, I usually get a warning that I must have a basic understanding of 'X' concepts. I just can't resist.

There is a bright side though, I'm not cornering myself. I'm picking up and learning new techniques by the hour, less than even. I've finally gotten ContentPlaceHolders under control, and it looks like it's doing exactly what I was trying to accomplish. No XML, but this still works like a charm.



P.S. My bad sunfighter, I thought that last part was part of your signature. That's the exact same resource I was reading. In fact, 80% of my reading comes from w3schools. Neat site there!

Last edited by bdenny20; 01-29-2013 at 07:05 PM..
bdenny20 is offline   Reply With Quote
Old 01-30-2013, 02:20 PM   PM User | #4
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,334
Thanks: 13
Thanked 207 Times in 207 Posts
DanInMa is on a distinguished road
learning .net myself too. I suspect you need to look at the XmlDataSource control. This page is out of date but it gets the idea across in a simple way.
http://www.codeproject.com/Articles/...l-in-ASP-NET-2
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Old 01-30-2013, 04:17 PM   PM User | #5
bdenny20
New Coder

 
Join Date: Jan 2013
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
bdenny20 is an unknown quantity at this point
Thanks for the heads up man!
Do you know if this is the most up-to-date way to do something like this? I've been harked at once here already for using old, out-of-date techniques, and I don't want to be there again...

Regardless, I'll read up on this. So much homework to do.
bdenny20 is offline   Reply With Quote
Old 01-30-2013, 07:22 PM   PM User | #6
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,334
Thanks: 13
Thanked 207 Times in 207 Posts
DanInMa is on a distinguished road
i cant answer best practice questions, but i use visual studio 10 with .net 4.0 and it's still a valid control in VS10, so im sure it's fine. No one else has piped up so I hope this helps.
( I spend alot of time on MSDN these days)

- oh ther is an asp.net forum btw, might wanna try there in regards to best practice or use of xmldatasource
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users

Last edited by DanInMa; 01-30-2013 at 07:24 PM..
DanInMa is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:06 AM.


Advertisement
Log in to turn off these ads.