473,396 Members | 2,039 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,396 software developers and data experts.

Name generation issues between 2000 Server and 2003 server

Not sure if this has been covered before.......
I have an issue with an asp.net application running on Windows 2000
server and Windows 2003 server:-

The name generation of html objects (ie input buttons etc) is
different between the 2 environments, even though both are running
..net v2.0.50727
2000 Server generates of the form:-

objSearchList:grdData:_ctl2:_ctl4
but 2003 server generates:-

objSearchList$grdData$ctl02$ctl04
As the working environment is no longer consistent it is no longer
possible to write dynamic javascripts for client-side validation.
We have plenty of customers still working with 2000 server, so
upgrading to 2003 server is not a solution.

Can anyone shed any more light on this?



Sep 22 '06 #1
3 1340
I wish I had more time to find an URL to help through this. If I understand
the problem correctly, you are writing JavaScript in the page, as
JavaScript, and linking to names you expect to be there. But, they are
generated differently on different versions of windows, so your JavaScript
points to non-existent controls.

You are wondering how you can get past this. One option, that you might have
thought of, is looping through the controls in JavaScript until you find the
right one, but you know that is not a good performance option. So, you want
to know how to get the proper name for the control on both environments.

If I have the above correct ...

You can still write dynamic Javascript (the key here being dynamic) on both
systems with the same code. But, you have to do it in codebehind and either
write the JavaScript out in a literal or emit the JavaScript. The
methodology is writing by asking the conrols what their page name is or what
Postback event they fire, etc.

The best way to get versed in this is to cull through the material on
EmitClientScript etc., along with a thorough review of the control
architecture, paying esp. close attention to the properties common to
controls that allow you to get client side names, etc. for the controls.

There is a lot of information in the controls, but, unfortunately, not a lot
of information about how to use it. As soon as you step out of the tiny box
MS has painted, you have to head out into the wilderness alone. Or, so it
seems.

I will see if I get some time at lunch to get a link for this, or cull
through some code and blog about it.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"Darren" <da*****@NOSPAMRQ.CO.UKwrote in message
news:7p********************************@4ax.com...
Not sure if this has been covered before.......
I have an issue with an asp.net application running on Windows 2000
server and Windows 2003 server:-

The name generation of html objects (ie input buttons etc) is
different between the 2 environments, even though both are running
.net v2.0.50727
2000 Server generates of the form:-

objSearchList:grdData:_ctl2:_ctl4
but 2003 server generates:-

objSearchList$grdData$ctl02$ctl04
As the working environment is no longer consistent it is no longer
possible to write dynamic javascripts for client-side validation.
We have plenty of customers still working with 2000 server, so
upgrading to 2003 server is not a solution.

Can anyone shed any more light on this?



Sep 22 '06 #2
As noted in the other repy, you are coding to the name you expect to be
generated.
But are you sure that the generated name is not available at the time
you're creating your script?
My situation: I had a user control with a list box. I needed the
generated name of the listbox, so I created a property in the code
behind that would get the lstBox.ClientID.
I was able to reference this property in javascript at the top of the
user control, using
window.document.forms[0][<% = lstBoxID %>]

Darren wrote:
Not sure if this has been covered before.......
I have an issue with an asp.net application running on Windows 2000
server and Windows 2003 server:-

The name generation of html objects (ie input buttons etc) is
different between the 2 environments, even though both are running
.net v2.0.50727
2000 Server generates of the form:-

objSearchList:grdData:_ctl2:_ctl4
but 2003 server generates:-

objSearchList$grdData$ctl02$ctl04
As the working environment is no longer consistent it is no longer
possible to write dynamic javascripts for client-side validation.
We have plenty of customers still working with 2000 server, so
upgrading to 2003 server is not a solution.

Can anyone shed any more light on this?
Sep 22 '06 #3
Thanks for the replies.

You've both given me some ideas, so I'll re-code a few sections.
Thanks
Darren

Sep 25 '06 #4

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

Similar topics

2
by: Todd D. Levy | last post by:
I recently picked up a copy of Office 2003, but have installed it (replacing my existing installation of Office XP Pro) yet because... I am in the middle of a client project using Access 2002...
11
by: Ken Varn | last post by:
I want to be able to determine my current line, file, and function in my C# application. I know that C++ has the __LINE__, __FUNCTION__, and __FILE___ macros for getting this, but I cannot find a...
0
by: Joeyej | last post by:
Hi - I'm trying to move/use a web form (containing some javascript field checks) previously hosted on a Windows 2000 server. However, the FORM METHOD="post..." command in the form (shown below)...
16
by: JCauble | last post by:
We have a large Asp.net application that is currently crashing our production servers. What we are seeing is the aspnet_wp eat up a bunch of memory and then stop unexpectedly. Does not recycle. ...
1
by: Ashley Bryant | last post by:
I have a web application built in ASP 3.0 that uses data from SQL Server 2000 to generate Visio 2002 drawings, save the drawings to a file on the webserver and then send that file to the browser. ...
3
by: Chris | last post by:
Don't know if there is a simple solution for this one or not. When running SQL server on a machine with 2000 loaded and the complete SQL package I don't have any issues. Now I'm trying to login...
0
by: Nagapa | last post by:
Hello there, I am impressed with the questions and answers in this forums and belive this group will help me thru my issues. We are currently upgrading our application hardware. Ours is VB...
4
by: =?Utf-8?B?ZGlub28=?= | last post by:
We are currently in the process of upgrading our web server from Windows 2000 advanced server to Windows 2003 SP2. We have few ASP.Net applications built with .NET framework 1.1 running on the web...
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...
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
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
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
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,...
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...

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.