You have three options:
1. Auto postback the DropDownList
This puts everything in your control, although it does cost a postback
2. Ajax
This makes it appear as if you are not round tripping, as only part of the
page is updated. This is the method I would most likely use, especially if
the dropdownlist had a large number of values
3. JavaScript
Embed the values in an array and do a lookup and update. With ASP.NET, it is
best to emit JavaScript and pull the control's client side name from code,
rather than hard code, as it is more maintainable.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
*********************************************
Think outside the box!
*********************************************
"Greg Stevens" <Gr***********@gmail.comwrote in message
news:E1**********************************@microsof t.com...
>I have an ASP.NET page with a form that contains two user controls:
<%@ Register TagPrefix="x" TagName="c1" Src="ctl1.ascx" %>
<%@ Register TagPrefix="x" TagName="c2" Src="ctl2.ascx" %>
<body>
<form runat="Server">
<x:c1 id="con1" runat="Server">
<x:c2 id="con2" runat="Server">
<form>
</body>
In one control (con1) I have a dropdownlist. In the other control (con2),
I
have a set of textboxes that I would like to pre-populate with values that
depend on what items is selected in the dropdownlist in the first control.
How does the code for con2 access the value of the dropdownlist in con1?
Thanks for any help or suggestions.