Try this...
<HTML>
<script language="javascript">
function myCB_CheckedChanged()
{
if (document.getElementById("myCB").checked == true)
document.getElementById("myDDL").disabled = false;
else
document.getElementById("myDDL").disabled = true;
}
</script>
<body>
<form id="Form1" method="post" runat="server">
<asp:CheckBox id="myCB" onclick="myCB_CheckedChanged();" runat="server"
Text="My Check Box" Checked=True />
<br>
<asp:DropDownList id="myDDL" runat="server"/>
</form>
</body>
</HTML>
"PawelR" wrote:
Thx,
but I don't know JavaScript can you help me?
In dropdownlist I use data from dataSet - from sql dataBase - this dynamic
list.
UÂżytkownik "Eliyahu Goldin" <re*************@monarchmed.com> napisaÂł w
wiadomoÂści news:Os**************@tk2msftngp13.phx.gbl... ASP.NET is a server side technology. You want to do something on client
side. For this you can just write some javascripts in your aspx file as if
it is a regular html file. All you need to know is what html controls will
represent your server controls on the client. A checkbox will become an
<input type=checkbox> and a ddl will turn into a <select>.
Eliyahu
"PawelR" <pa************@poczta.onet.pl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... Hello group,
I'm begginer in ASP.net and my question is very simple.
In my webform I have CheckBox (myCB) and DropDownList (myDDL). I want set
myDDL.Enabled =myCB.Checked and show change without refresh
website (without send formular to server) - run this on client site.
Thx
PawelR