Solved

Help HTMLDocument

Posted on 2004-04-08
1
543 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
asp.net mvc5 3 38
Object Oriented Best Practice 5 35
Paging GridView 7 34
Saveas need to save a copy 16 11
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

26 Experts available now in Live!

Get 1:1 Help Now