473,408 Members | 2,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Iterating through a forms collection and setting variables for nodes

Hi,

I have an html form (created by transforming an xml doc with an xsl
stylesheet and sent as html within an asp.net page.

The doc is a set of user instructions steps. For each
of the elements that allow user input (<measurement> and
<data_collection>, for example, my xsl turns that into an
<input type=text name="the unique name attribute defined in the base xml
doc" box in the html form (I would post it, but it's really quite
large).

The only "changes" the user is allowed to make are via these text boxes.
When the user is done, they click a Submit button. The submit javascript
then opens an aspx page (hidden from the user), where I would use code
to load the original xml doc and that's where I need to
do node.value changes FOR EACH TEXTBOX INPUT before saving the entire
DOM.

Again, because these instruction docs have an unknown number/type
(different elements such as <measurement> and <data_collection> of
name/value pairs).

For example, a request.form collection could end up having 2 pairs from
two html textboxes name="one", name="two".

For each, I need to set a variable name so I can use that in an xpath to
get to the right DOM node (yes?).

Dim xElem As XmlElement =
xDoc.SelectSingleNode("//measurement[@name='" & varName & "'")

Then I could do a node.value = "value of the name/value pair here".

Move onto the next name/value pair, set the varName variable, etc.

Am I thinking about this in the right way? And, if so, does someone know
how I can set the variable for each name/value pair as described?

Thanks for any feedback/ideas!

Kathy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 11 '05 #1
0 1556

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Patrick von Harsdorf | last post by:
I want to iterate over a collection and delete all unwanted entries. for item in collection: del item of course doesn´t do anything useful. Two things come to mind: a) iterating backwards...
1
by: David E | last post by:
Hi, I have an asp application that I install on quite a few different servers. omally this works fine and I have never had a serious issue with it untill today. I installed the site in the...
25
by: Steve Jorgensen | last post by:
Yup, Steve's full of tips, but hey, it makes him feel important, right? Ok, here goes. I've been trying to improve encapsulation by putting code in the same object as the stuff it affects, so I...
5
by: Max | last post by:
Hi All! I'm doing an ASP.NET project which uses Persistent Forms Authentication (i.e. once user logged in, they don't have to log in again). However Session variables are erased after Session...
6
by: Edwinah63 | last post by:
Hi everyone, could someone give me some thoughts on the best way to manage mdi parent and child forms? in vb6 i could scroll through the forms collection and determine which forms were...
8
by: | last post by:
I have the following class : Public Class MyTreeNode Inherits TreeNode Dim mystring As String End Class Now, when I try to do this : ''''''''''''nodes is a TreeNodeCollection, s is string
2
by: David Veeneman | last post by:
Is there a way to iterate the components on a form? I need to determine whether an instance of my custom component (a System.ComponentModel component) is present in a form. I have tried...
1
by: Garudzo | last post by:
Hi I am trying to use the Windows treeview in a MS Access application. I want to iterate through child nodes of a particular node but i am failing to figure out how to do it. I have even tried the...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.