Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

using xml as html

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kal - 15 Jul 2007 13:50 GMT
Hi.

I have some xhtml in a file called test.xml.
I created a div on my page then in the page load event i load test.xml into
a smldoc and then
div.innerhtml=doc.innerxml

this seems to work - for all the text bit - but wont seem to get the <img>
that i have in the xml file.

is there some other way i shoud be doing this?

Thanks

Kal
nahid - 15 Jul 2007 14:15 GMT
> Hi.
>
[quoted text clipped - 11 lines]
>
> Kal

hi,
i'm try this way and get things working

<body>
   <form id="form1" runat="server">
   <div runat="server" id="xmldiv">
   </div>
   </form>
</body>

protected void Page_Load(object sender, EventArgs e)
   {
       xmldiv.InnerHtml="<img src=\"0.jpg\" />";
   }

can you please show how you images are pointed in xml

nahid
http://nahidulkibria.blogspot.com/
http://www.kaz.com.bd
kal - 15 Jul 2007 14:24 GMT
Thanks - I resolved this - sorry - it was a path problem - i had to change
the path to the image so that it was relative to the aspx page and not the
xml file.

thanks

>> Hi.
>>
[quoted text clipped - 34 lines]
> http://nahidulkibria.blogspot.com/
> http://www.kaz.com.bd
nahid - 15 Jul 2007 16:17 GMT
> Hi.
>
[quoted text clipped - 11 lines]
>
> Kal

.....................opps i was mistake...i was remove the original
post...
hi,
i'm try this way and get things working

<body>
   <form id="form1" runat="server">
   <div runat="server" id="xmldiv">
   </div>
   </form>
</body>

protected void Page_Load(object sender, EventArgs e)
   {
       xmldiv.InnerHtml="<img src=\"0.jpg\" />";
   }

can you please show how you images are pointed in xml

nahid
http://nahidulkibria.blogspot.com/
http://www.kaz.com.bd

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.