DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 25 Jul 2007 15:38:33 -0400,    posted on: microsoft.public.dotnet.framework.aspnet.webcontrols        back       

Thread Index
  1    Mufasa
          2    marss


Trying to get an asp:Checkbox to display an alert when the person clicks it.   
I have a situation where I need to display an alert when somebody clicks a 
check box. I was able to get it to work with a plain <input> but when I try 
and do it with an <asp:CheckBox> I can't get the javascript right.

Anybody have any thoughts?

TIA - Jeff.
Date:Wed, 25 Jul 2007 15:38:33 -0400   Author:  

Re: Trying to get an asp:Checkbox to display an alert when the person clicks it.   
On 25    , 22:38, "Mufasa"  wrote:

> I have a situation where I need to display an alert when somebody clicks a
> check box. I was able to get it to work with a plain <input> but when I try
> and do it with an <asp:CheckBox> I can't get the javascript right.
>
> Anybody have any thoughts?
>
> TIA - Jeff.


<asp:CheckBox ID="CheckBox1" runat="server" ....

Code behind:
protected void Page_Load(object sender, EventArgs e)
{
   ...
   CheckBox1.Attributes.Add("onclick", "alert('clicked');");

Regards,
Mykola
Date:Thu, 26 Jul 2007 06:26:40 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us