Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2005, 01:07 PM
Authorized User
 
Join Date: Apr 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access a web user control from javascript?

hi gents

bit of an odd one here...Im creating a heirarchy tree which on click can run javascript. This tree is in a web user control. Basically I want to pull back the id of the item they clicked...

so my question is.

can I use javascript to set a property of the control to the id?

if so how? if not, am I being stupid and there is a better way?

thanks for the help


 
Old July 5th, 2005, 10:55 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You can use server controls (or HTML controls with runat="server") to get client-side generated information back to the server. I have many client rich controls that perform actions on the client side and populate hidden form fields to send information back to the server. That what I have found to best solve this problem.

-Peter
 
Old July 6th, 2005, 03:07 AM
Authorized User
 
Join Date: Apr 2005
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi Peter

That sounds like it could work, so essentially id use javascript to change a hidden field the hidden field event fires and set the property? is that the best way to do it? can I then read the property using javascript or similar?

Im testing now but could you post a couple of pieces of code maybe?

thanks again...

 
Old July 21st, 2005, 07:24 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Did you get this issue resolved?

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
textbox value using javascript on user control k.manisha ASP.NET 1.0 and 1.1 Professional 1 February 12th, 2007 04:48 PM
Access a web control from Javascript ADMystery Javascript 0 August 31st, 2006 03:57 AM
Add Windows User control in Web User Control agarwalvidhu C# 0 March 30th, 2006 01:17 AM
File Manager Javascript in User Control seanmayhew BOOK: ASP.NET Website Programming Problem-Design-Solution 0 September 16th, 2004 09:42 AM
User Control & Javascript smrao0906 Wrox Book Feedback 1 October 9th, 2003 08:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.