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

Go down

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

Post by BIT0102-Mohaimin on 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)
avatar
BIT0102-Mohaimin
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 415
Points : 715

View user profile

Back to top Go down

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

Post by BIT0122-Amit on 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?

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.

|About me|My Blog|
avatar
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

View user profile http://iitdu.forumsmotion.com

Back to top Go down

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

Post by BIT0102-Mohaimin on 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.
avatar
BIT0102-Mohaimin
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 415
Points : 715

View user profile

Back to top Go down

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

Post by BIT0130-Shakkhor on 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.

_________________________________________________________________
I'm not a driver with drinking problem.
I'm an alcoholic with driving problem.

Blog | বাংলা ব্লগ
avatar
BIT0130-Shakkhor
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 209
Points : 328

View user profile

Back to top Go down

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

Post by BIT0102-Mohaimin on 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.
avatar
BIT0102-Mohaimin
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 415
Points : 715

View user profile

Back to top Go down

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

Post by BIT0122-Amit on 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

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.

|About me|My Blog|
avatar
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

View user profile http://iitdu.forumsmotion.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


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