Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Trouble with autogenerated id on differently configuerd machines

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tonicvodka - 05 Sep 2007 13:02 GMT
Hi everyone!

On my development machine I'm running Windows XP Professional and
ASP.NET 2.0.50727.
On the production server we're running Windows Server 2003 and ASP.NET
2.0.50727.

When I deploy the same project on both, the asp:datalist autogenerates
it's objects id's differently;

DEV-server: <table id="lstEstates__ctl0_tblEstate"

PROD-server: <table id="lstEstates_ctl00_tblEstate"

Has anyone experienced this? Is there a workaround? Since I'm building
scripts with the autogenerated ID's from lstEstates_ItemDataBound-
function it's causing a problem.

Thanks for any help!

Niclas
Peter Bromberg [C# MVP] - 05 Sep 2007 13:10 GMT
You can use a control's ClientID property in generating your script code (it
needs to be concatenated into the script string at execution time) in order
to ensure that you always are using the correct id.
-- Peter
Recursion: see Recursion
site:  http://www.eggheadcafe.com
unBlog:  http://petesbloggerama.blogspot.com
BlogMetaFinder:    http://www.blogmetafinder.com

> Hi everyone!
>
[quoted text clipped - 17 lines]
>
> Niclas
tonicvodka - 05 Sep 2007 14:14 GMT
On 5 Sep, 14:10, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yohohhoandabottleofrum.com> wrote:
> You can use a control's ClientID property in generating your script code (it
> needs to be concatenated into the script string at execution time) in order
[quoted text clipped - 28 lines]
>
> - Visa citerad text -

Thanks Peter,

Excellent, it works! I was building my own clientids, this seems like
a better approach :)

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.