473,387 Members | 1,721 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,387 software developers and data experts.

name property for <form does not appear html page

I have a vb.net page that uses a form as below:

<form id="Visual" name="Visual" method="post" runat="server">

If I run this on my Windows XP development PC then the HTML generated from
it is:

<form name="Visual" method="post" action="Salesreport.aspx?Index=7"
language="javascript" onsubmit="javascript:return WebForm_OnSubmit();"
id="Visual">

As you can see the form still contains the 'name=...'

However if I run the same form on my live Windows 2000 server, the HTML
generated is:

<form method="post" action="Salesreport.aspx?Index=7"
onsubmit="javascript:return WebForm_OnSubmit();" id="Visual">

and as you can see the 'name' and 'language' properties are missing.

I need the 'name' property to appear as in my development environment as
this is used by a calendar control that is called from the page.

Has anybody any idea why it appears on my dev PC and not my live server?

Is it a versioning issue, and if so how do I go about checking versions etc?
Thanks, Mike.

Jun 8 '06 #1
7 1531
Hi Mike,

Thank you for your post.

I was unable to repro the problem you described. Simply create an empty
WebForm with the form declaration you provided will produce same result on
Windows XP and 2000. Since the html source your described contains some
other attributes, I think you must have been using custom code to modify
the form. Would you mind posting some more code or creating a repro project
for that? Also, please tell me which ASP.NET version you are using. Thanks.
Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 9 '06 #2
Walter,

First of all apologies as the live server the code is running on is Windows
2003 Web Server, and not Windows 2000 Server as I put in my first post! (I
have 2 live servers!)

I tried a blank form as you suggested, and it had the same result.

Interestingly when the start of the form is as follows:

<form name="TestForm" id="form1" runat="server">

The development PC (Windows XP) comes back with:

<form name="form1" method="post" action="Test.aspx" id="form1">

i.e. the name has been changed to 'form1' from 'TestForm'. This would not
be a problem for me, but it not appearing at all does!

The live Windows 2003 server still comes back without a name, i.e.:

<form method="post" action="Test.aspx" id="form1">

I think it must be due to slight differences in the versions of .Net running
- How do I as you suggest check the versions that are running?, and what do I
do if the Windows 2003 server is out of date?
Thanks, Mike.
"Walter Wang [MSFT]" wrote:
Hi Mike,

Thank you for your post.

I was unable to repro the problem you described. Simply create an empty
WebForm with the form declaration you provided will produce same result on
Windows XP and 2000. Since the html source your described contains some
other attributes, I think you must have been using custom code to modify
the form. Would you mind posting some more code or creating a repro project
for that? Also, please tell me which ASP.NET version you are using. Thanks.
Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 9 '06 #3
Hi Mike,

Thank you for your update.
The name attribute is only valid on the <form> and form elements (such as
<input>, <textarea>, <select>). It's used to specify the name to associate
with the name/value pair that is submitted on a form post.

For example:

<input type=checkbox name=foo value=1>

If checked will submit with foo=1.

In the DOM you can reference form elements from the form.elements
collection by specifying the name as the index. If the name is not unique,
the collection returns an array of elements rather than the element. You
can look up form elements by name:

document.getElementsByName(nameValue)

Note: if always returns an array even if only one element is found.

The id attribute is from the XML world, and is unique for any node, not
just for form element. To find any html element by id:

document.getElementById(idValue)

This only returns one dom node.

Based on my research, the name attribute is always generated by ASP.NET and
forced set to its id attribute value, regarding whether or not you
specified it manually. Also it works the same way either in ASP.NET 1.1 and
2.0.

To check the ASP.NET version used in a website, in IIS manager, you can
open the Properties dialog of the website and find a tab named "ASP.NET",
there's a Combobox to change the ASP.NET version, --if you've installed
multiple .NET framework versions.

Hope this helps.

Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 9 '06 #4
It's very strange that it should be produced, yet isn't on the live 2003 web
server.

The versions of ASP.NET are:

- 2.0.50215.0 on the Windows 2003 Web Server, and
- 2.0.50727 on the dev PC.

Is it worth me trying to update the version on the Windows 2003 Web Server,
and if so where is the best place to get it from?
Thanks, Mike.

"Walter Wang [MSFT]" wrote:
Hi Mike,

Thank you for your update.
The name attribute is only valid on the <form> and form elements (such as
<input>, <textarea>, <select>). It's used to specify the name to associate
with the name/value pair that is submitted on a form post.

For example:

<input type=checkbox name=foo value=1>

If checked will submit with foo=1.

In the DOM you can reference form elements from the form.elements
collection by specifying the name as the index. If the name is not unique,
the collection returns an array of elements rather than the element. You
can look up form elements by name:

document.getElementsByName(nameValue)

Note: if always returns an array even if only one element is found.

The id attribute is from the XML world, and is unique for any node, not
just for form element. To find any html element by id:

document.getElementById(idValue)

This only returns one dom node.

Based on my research, the name attribute is always generated by ASP.NET and
forced set to its id attribute value, regarding whether or not you
specified it manually. Also it works the same way either in ASP.NET 1.1 and
2.0.

To check the ASP.NET version used in a website, in IIS manager, you can
open the Properties dialog of the website and find a tab named "ASP.NET",
there's a Combobox to change the ASP.NET version, --if you've installed
multiple .NET framework versions.

Hope this helps.

Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 9 '06 #5
Hi Mike,

Thank you for your update.

Looks like you're not running latest version of ASP.NET on the Windows 2003
Server, try to update it.

Please feel free to post here if you need more help.

Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 12 '06 #6
Walter,

I thought the version of ASP.Net that I had on my live server was V 2.0 -
But it looks like it is older than the first RTM, i.e. 2.0 Original RTM
2.0.50727.42 .

Does this mean that the version I have on my live web server is a Beta, and
I will therefore have to remove it before installing 2.0 Original RTM
2.0.50727.42 ?
Cheers, Mike.

"Walter Wang [MSFT]" wrote:
Hi Mike,

Thank you for your update.

Looks like you're not running latest version of ASP.NET on the Windows 2003
Server, try to update it.

Please feel free to post here if you need more help.

Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 12 '06 #7
Hi Mike,

Thank you for your update.

Yes you need to remove the old version and install the RTM version.

Please feel free to post here if you need more help.

Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 13 '06 #8

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

Similar topics

2
by: hamidi | last post by:
hi how can i have a custom control in a property page? i think i may register a window class, but i don't know how. i think another way may be overriding OnPaint on a CStatic, but i know how to...
1
by: John Hunter | last post by:
I've recently had a nasty problem with the "Invalid reference to the property Form" error in subforms - nasty because it doesn't seem to consistently happen to all forms which contain the same...
0
by: Victor Yen | last post by:
Hi, I am a beganer of programming. Now I am using eMbedded Visual C++3.0 to write a program on my PDA. I want to use menu in my dialog box. I think I had successfully added the menu, however, when...
1
by: gotFun | last post by:
I am unable to set focus to an IP address control residing on a Property Page, following validation of the IP when the user hits the 'Finish' button on the Property Sheet. I've unsuccessfully...
2
by: James Tillery | last post by:
I hope I can describe this correctly: I have a asp.net custom control and I have what I see as a complicated bunch of properties that I would like to have set in there own property page. I'm...
1
by: Nate | last post by:
I have my own data type, and I want to create a property page (dialog) for it. Basically, I want to display my object using the PropertyGrid control. If I have a variable of type "font", then...
2
by: genojoe | last post by:
Using ADOX to update a Property does not work. I want to change the Access database for a linked table. My abridged code is: Dim oCAT As ADOX.Catalog oCAT = New ADOX.Catalog...
1
by: --== Alain ==-- | last post by:
Hi, I have a huge problem... My property does not appear in the "propertyGrid" of "test Container", when i test my custom control. Here is the custom control code : namespace...
1
by: jobsjournal | last post by:
hi, i'm a newbie here. need help on how to make &lt; appear as &lt; and a&gt; appear as a&gt; without turning to the < and > sign, respectively. just for knowledge thanks jobs
3
by: MyWaterloo | last post by:
I am trying to open my purchase orders form and go to the last record. In the on open command I do: DoCmd.GoToRecord , , acLast Seems straight forward enough...but I keep getting this message...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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
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...

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.