IITDU Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

ASP.net: how to render xml content as partial view

3 posters

Go down

User verified solution ASP.net: how to render xml content as partial view

Post by BIT0102-Mohaimin Thu Aug 04, 2011 6:43 pm

I want to display a xml string (suppose formatted) "as it is" in a partial view. That means, the output should contain the tags.

Like this:
Code:

 <test att = "1">
      TEXT
  </test>


Last edited by BIT0102-Mohaimin on Mon Aug 15, 2011 2:28 am; edited 1 time in total (Reason for editing : Marked Solved)
BIT0102-Mohaimin
BIT0102-Mohaimin
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 415
Points : 715

Back to top Go down

User verified solution Re: ASP.net: how to render xml content as partial view

Post by BIT0122-Amit Thu Aug 04, 2011 11:42 pm

in partial view? You mean the partial view in visual studio?

Or you mean you want to view the code in a asp.net page as code?
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

User verified solution Re: ASP.net: how to render xml content as partial view

Post by BIT0102-Mohaimin Fri Aug 05, 2011 1:03 pm

BIT0122-Amit wrote:in partial view? You mean the partial view in visual studio?

Or you mean you want to view the code in a asp.net page as code?
I did not understand your question. I want to display a partial view returned by an action method.
BIT0102-Mohaimin
BIT0102-Mohaimin
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 415
Points : 715

Back to top Go down

User verified solution Re: ASP.net: how to render xml content as partial view

Post by BIT0130-Shakkhor Sat Aug 06, 2011 12:49 am

Have you tried using the escape characters for XML? I mean, if you want to print a <, did you tried with & l t; (without the spaces)?
I didn't try this but this should work.
Here's a list of XML escape sequences.
BIT0130-Shakkhor
BIT0130-Shakkhor
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 209
Points : 328

Back to top Go down

User verified solution Re: ASP.net: how to render xml content as partial view

Post by BIT0102-Mohaimin Sat Aug 06, 2011 6:18 pm

Thanks everyone. The problem was solved.

I am using an iframe to display the xml.

iframe is treated as just like a browser. You may have opened an xml file in browser. It looks exactly the same in an iframe.
BIT0102-Mohaimin
BIT0102-Mohaimin
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 415
Points : 715

Back to top Go down

User verified solution Re: ASP.net: how to render xml content as partial view

Post by BIT0122-Amit Sat Aug 06, 2011 10:16 pm

I see. Good to know Very Happy

Can you provide a sample code so that our readers can grasp even better idea?

Maybe you can use the solved icon in this topic Very Happy
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

User verified solution Re: ASP.net: how to render xml content as partial view

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum