473,467 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

<asp:xml> question

Hi,

I use the <asp:xml> control, xml and xslt to generate a HTML for users to
input data, here is my HTML snippet in a web form:
<asp:Xml id="Xml1" runat="server" TransformSource="entry.xsl"
DocumentSource="data.xml"></asp:Xml>

The form display correctly in the browser, the question is, how do I get the
values users input?

To clarify a little bit, with data.xml and entry.xsl, Xml1 generated HTML
form like this:
<table border="0">
<tr>
<td>
Address: <input type="text" id="txtAddress" name="txtAddress"
class="underline" onchange="update1();">
</td>
</tr>
<tr>
<td>
Name: <input type="text" id="txtName" name="txtName" class="noborder"
onchange="update1();">
</td>
</tr>
</table>
The users can input something into address and name fields. In the web form
code behind file, I would like to get values user inputted.

Thanks in Advance


Nov 18 '05 #1
1 1208
Danny,
In order to get the values in your server code, the input fields need to
be server controls. Just transforming xml to emit html <input> elements
doesn't make them server controls, and your server code will have no
visibility to their values.

I don't know the details of your situation, but if the page posts back
to itself, these <input> elements will still send data to the server, so you
could get these values by using Request.Form["txtAddress"] and
Request.Form["txtName"].

Best regards,
Jeffrey Palermo

"Danny Ni" <dn**@yahoo.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
Hi,

I use the <asp:xml> control, xml and xslt to generate a HTML for users to input data, here is my HTML snippet in a web form:
<asp:Xml id="Xml1" runat="server" TransformSource="entry.xsl"
DocumentSource="data.xml"></asp:Xml>

The form display correctly in the browser, the question is, how do I get the values users input?

To clarify a little bit, with data.xml and entry.xsl, Xml1 generated HTML
form like this:
<table border="0">
<tr>
<td>
Address: <input type="text" id="txtAddress" name="txtAddress"
class="underline" onchange="update1();">
</td>
</tr>
<tr>
<td>
Name: <input type="text" id="txtName" name="txtName" class="noborder"
onchange="update1();">
</td>
</tr>
</table>
The users can input something into address and name fields. In the web form code behind file, I would like to get values user inputted.

Thanks in Advance

Nov 18 '05 #2

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

Similar topics

3
by: Todd | last post by:
Our ASP.NET (C#) application accepts form entry and saves inputed data in XML. We are finding that users are sometimes cutting and pasting special characters (from MS Word) into these forms....
5
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the...
2
by: LaLaBoy | last post by:
I have a problem when reading Special Characters in an XML File I read the following article http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q30806 However, It doesn't not solve the...
1
by: Greg Collins [MVP] | last post by:
I've got a web site I've built that uses an InfoPath form to generate an xml file. This file is then transformed within the default.aspx page to create the contents of the page. The problem I'm...
0
by: Random | last post by:
I would like to be able to read an Xml file with an <asp:Xml> Web Control and using XSLT dynamically write <asp:Xml> Web Controls to the page using the information from the first Xml file, which...
16
by: lreames | last post by:
I am new to XML, but not ASP. I have the following XML that I load via Dim xml Set xml = Server.CreateObject("Microsoft.XMLDOM") xml.async = False xml.loadXML xmldom.xml
2
by: Mark Rae | last post by:
Hi, I'm interested in what people think of the new <asp:Menu> control in comparison to other 3rd-party menu controls. E.g. until v2, I used the AITOC FlexMenu...
3
by: Maxwell2006 | last post by:
Hi, We have Excel 2003 templates and we need to automatically generate excel 2003 xls files based on our SQL server database tables' data. Since we need to generate the xls files at out asp.net...
1
by: =?Utf-8?B?RGlmZmlkZW50?= | last post by:
Hello All, I have a simple web form that has an <asp:xmlcontrol. I am using a dataset's getXml() and binding it to the Document property of xml control. I am also using an XSLTransform object to...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.