Solved

Help HTMLDocument

Posted on 2004-04-08
1
569 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

724 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