Thanks Page,
I was trying to figure out a way to add onclick event but the onchange is
what I really want. How does one determine which events/attributes are
"allowed" for a particular ASP control and that the control will respond as
expected? I an guessing that because the onchange attribute is allowed for
the HTML <selecttag which accomplishes the same action it would be
allowed.
Of course (light bulb just went on) the DropDownList control must render as
an HTML <selectand therefore the OnChange event would be perfectly legal
at the browser. Yes I was missing an important but simple concept. Sometimes
I get so focused on the Server side processing of Server Controls I lose
site of the fact that they are simply rendered as standard HTML.
I would love to find a chart to post by my desk "<Server Control-- renders
as -- <HTML Tags>". Almost as important a reminder as the Page Event life
cycle on the server side.
Thanks again Page for making this task easier...
"Page Brooks" <NO**************@gmail.comwrote in message
news:eX**************@TK2MSFTNGP04.phx.gbl...
John,
You could add this to your Page_Load event on your codebehind:
cboList.Attributes.Add("onchange", "ckCat();");
--
Page Brooks
www.explosivedog.com
"John Kotuby" <jo***@powerlist.comwrote in message
news:OF*************@TK2MSFTNGP06.phx.gbl...
>Hi all...
I am trying to do a simple thing and maybe am missing something
elementary. I have created a Javascript function at the top of a page
which is meant to enable editing of an HTML input textbox when the user
makes a selection from the DropDownList control. Since there is no
OnClick event I have tried using OnSelectedIndexChanged or OnTextChanged
such as OnTextChanged ="ckCat()" with ckCat being the javascript function
name. I have purposely set AutoPostback="false" to make sure that wasn't
the problem. I have also tried using the syntax OnTextChanged
="javascript:ckCat()" to no avail. It's pretty easy to do in classic
ASP, but I am trying to get accustomed to the .NET way of doing things.
Does anyone know what I am missing? I am thinking there must be a way to
enable clientside handling of a DropDownList event, especially with
AutoPostback turned off. I'm just drawing a blank right now.
Thanks to all for any input...