Solved

Help HTMLDocument

Posted on 2004-04-08
1
548 Views
Last Modified: 2012-05-04
Hi,,

 This is the code I have:


Dim XMLDOM As XmlDocument = New XmlDocument()
        Dim i As Integer
        Dim elementObj As IHTMLElement
        Dim HTMLDoc As HTMLDocument
        XMLDOM.LoadXml(s_strXMLData)
        Dim XMLNode As XmlElement = XMLDOM.DocumentElement()
        TemplateURL = s_URLString
        HTMLDoc = ParseHTML()
        Dim objElements As IHTMLElementCollection = HTMLDoc.all
        For i = 0 To XMLNode.ChildNodes(0).ChildNodes.Count - 1
            For Each elementObj In objElements
                If elementObj.id = "X_" & XMLNode.ChildNodes(0).ChildNodes(i).Name Then
                    elementObj.innerText = XMLNode.ChildNodes(0).ChildNodes(i).InnerXml
                End If
            Next
        Next


This doesnt work INPUT tag of type radio. That is if elementObj  is "Radio" how do I insert a value for the tag????? With INPUT tag of type "radio", it is innertext...Same question for checkboxes and selection lists....Can someone help???Thanks.
0
Comment
Question by:rajesh75
1 Comment
 
LVL 3

Accepted Solution

by:
gillit earned 125 total points
ID: 10787822
INPUT tags are used primarily for html. There is a way to change its values with the InputId.Attribute feature.

With .NET you are given similar tools with its webform controls which are much easier to use and understand. Here is a list of HTML -> .NET Control and some links that gives examples on how to use them.

INPUT (radio) -> RadioButtonList
 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsradiobuttonlistclasstopic.asp

INPUT (checkboxes) -> CheckBoxList
  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolscheckboxlistclasstopic.asp

INPUT (selection) -> ListBox
  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIWebControlsListBoxClassTopic.asp

Hope this helps.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now