Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 6th, 2006, 06:44 AM
Registered User
 
Join Date: Feb 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTML Object in VB

Hi friends,
i'm doing a web application using ASP and VB. Here i have a question need you all helps.
If i have a HTML code string and how can i use it properly? Belows shown my code:

Code:
Dim objHTMLDoc As HTMLDocument
Dim strContentAs String

Set objHTMLDoc = New HTMLDocument
strContent = "<Table><center><img src=""SaveFile.asp? " & _ strAttachID=5531&strType=Msg"" Width=""600""/><TR><TD>"

objHTMLDoc2.body.innerHTML = strContent
Debug.Print strContent
Debug.Print objHTMLDoc2.body.innerHTML
Belows is the output:

Code:
<Table><center><img src="SaveFile.asp?strAttachID=5531&strType=Msg" Width="600"/><TR><TD>

<TABLE>
<CENTER><IMG src="about:blankSaveFile.asp?strAttachID=5531&amp;strType=Msg" width=600>
<TBODY>
<TR>
<TD></TR></TBODY></CENTER></TABLE>
Here are 1 question and 1 problem:
Question: is this the HTMLDocument object behaviour that add <TBODY> tag after each <TABLE> tag?

Problem: To be awared that the content of <IMG> tag has been changed:
<img src="SaveFile.asp?strAttachID=5531&strType=Msg" Width="600"/> had changed to:
<IMG src="about:blankSaveFile.asp?strAttachID=5531&amp; strType=Msg" width=600>

The attribute of <IMG>, Src, was changed so that the image cannot be displayed in HTML browser. How can i solve the problem?







Similar Threads
Thread Thread Starter Forum Replies Last Post
Placing HTML object in ASP.NET toddw607 ASP.NET 2.0 Basics 3 April 30th, 2008 03:58 PM
how to take tooltip object in HTML pushpa ASP.NET 1.0 and 1.1 Basics 6 May 11th, 2007 05:37 PM
converting .NET error object in VB error object webnet .NET Web Services 0 February 5th, 2007 06:02 AM
problem Extracting Data using HTML Object Library method VB How-To 0 May 12th, 2006 02:52 AM
Getting HTML from IWebBrowserApp object? Ron Howerton Pro VB 6 1 July 14th, 2005 01:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.