473,805 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

request.form collection - how to dynamically update nodes from xsl/html source?

Hi, I have a transformed xml source into html for client input. In
order to update the xmlDoc on the server, how do I specify the correct
nodes if they are built dynamically through assigning id's via the xsl
transformation?

Example:

within the xml/html I could have two input boxes whose names are not
assigned until tranformation, e.g., step_2.1_measur e,
step_3.2_measur e. How to capture the inner.text of these two items in
the server-side code?

I know understand I would generally use something like this for the
request.form action:

System.Xml.XmlD ocument doc = new System.Xml.XmlD ocument();
doc.Load(Server .MapPath("data/xmlfile1.xml")) ;
if(!IsPostBack)
{
System.Xml.XmlD ocument doc = new System.Xml.XmlD ocument();
doc.Load(Server .MapPath("data/xmlfile1.xml")) ;
System.Xml.Xsl. XslTransform trans = new
System.Xml.Xsl. XslTransform();
trans.Load(Serv er.MapPath("xsl t/xsltfile1.xslt" ));
//transform the results directly to the output stream
trans.Transform (doc,null,Respo nse.OutputStrea m,new
System.Xml.XmlU rlResolver());
}
else
{
System.Xml.XmlN ode node = doc.SelectSingl eNode("Customer/@ID");
node.Value = Request.Form["txtCustome rID"];
doc.Save(Server .MapPath("data/newxmlfile1.xml "));
}

HOW to get the named nodes into the code above???

Hope this is clear enough...thanks in advance...this is my last big
piece of the puzzle I need to finish something.

Kathy
Nov 11 '05 #1
2 2177
KathyB wrote:
Hi, I have a transformed xml source into html for client input. In
order to update the xmlDoc on the server, how do I specify the correct
nodes if they are built dynamically through assigning id's via the xsl
transformation?

Example:

within the xml/html I could have two input boxes whose names are not
assigned until tranformation, e.g., step_2.1_measur e,
step_3.2_measur e. How to capture the inner.text of these two items in
the server-side code?


I'm not sure I fully understand what do you mean, but you can pass these
values as parameters to XSL Transformation using XsltArgumentLis t
collection.
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #2
Not sure I understand either... Are you asking how to retrieve the elements
by ID from the Form collection? Or are you having problem accessing
elements when you are not sure what the ID of the element is?

--
Kirk Allen Evans
www.xmlandasp.net
Read my web log at http://weblogs.asp.net/kaevans
"Oleg Tkachenko" <ol***@multicon n.com> wrote in message
news:eH******** ******@TK2MSFTN GP10.phx.gbl...
KathyB wrote:
Hi, I have a transformed xml source into html for client input. In
order to update the xmlDoc on the server, how do I specify the correct
nodes if they are built dynamically through assigning id's via the xsl
transformation?

Example:

within the xml/html I could have two input boxes whose names are not
assigned until tranformation, e.g., step_2.1_measur e,
step_3.2_measur e. How to capture the inner.text of these two items in
the server-side code?


I'm not sure I fully understand what do you mean, but you can pass these
values as parameters to XSL Transformation using XsltArgumentLis t
collection.
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #3

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

Similar topics

10
15646
by: Dan | last post by:
When using checkboxes on a form, if you uncheck them, the unchecked name/value pair in the Request.Form collection doesn't show up. It only shows when the checkbox is set to ON. Is this correct? What's the workaround if it is?
4
10563
by: Pavils Jurjans | last post by:
Hallo, I am working on multilingual web-application, and I have to be very sure about how the international characters are encoded and decoded in the client-server form requests. There's a great article about the issue: http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html Generally, that states that this are is filled with landmines. From my tests
4
4299
by: Paxton | last post by:
At the risk of being told "If it ain't broke, don't fix it", my code works, but is ugly. Part of the admin site I'm working on at the moment includes a facility for users to enter Formulations (recipes for making cosmetics etc) in 3 stages: Stage 1: basic info such as title, method etc and number of Phases (steps in recipe). Stage 2: dynamically generated form containing the exact number of phases as textboxes, depending on the number...
5
3566
by: mvr | last post by:
Hi all IIS 5.0, ASP, and https:// I have "DataEntrypage.asp" which is a data entry page(about 250 data elements includes text boxes, radio buttons, check boxes, drop down boxes etc). After the data validation through javascript(form.action = "ProcessData.asp" )I post this page to "ProcessData.asp" which process all
1
1630
by: Howard Jess | last post by:
Apparently, form elements of type <input type="image" src="...> are not included in the form's elements collection. I don't understand why not; according to DOM2, all form control elements in the form are part of the elements collection. Further, this element doesn't appear in the (DOM0) document.images collection either; so it's really not well-accounted for.
5
13130
by: CodeRazor | last post by:
I am dynamically creating htmlinputcheckbox controls. Each of these will have a name,id and value. The user make a selection by checking the checkboxes. I then want to retrieve the the checkboxes selected. Where i am having difficulties is that these htmlinputcheckboxes are not part of a control collection, so i am baffled as to how i can retrieve them using Request.Form.GetValues();
8
4318
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image button at runtime: //----- Code snippet protected System.Web.UI.WebControls.PlaceHolder ImageHolder; private void Page_Load(object sender, System.EventArgs e)
10
3480
by: Mr Newbie | last post by:
DropDown lists and Listboxes do not appear in the list of controls and values passed back to the server on PostBack in Request.Form object. Can someone confirm this to be correct and possibly answer why ? The impact of this is that values added via javascript will never make it back to the server side code unless one does some jiggery pokery with hidden fields etc. If this is true, then I would like to understand the reason behind the...
1
3404
by: cannontrodder | last post by:
I am writing a composite control that allows two-way binding between a collection of boolean values and a set of checkboxes. In the CreateChildControls, I add each checkbox control that I need and give it a numbered id/name while setting it's checked property as per the values in my boolean collection. When I create the control on postback, I pull the datasource out of viewstate and re-create the checkboxes again with the data source...
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10607
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10359
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5541
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.