- 
	
	
		
			
			
				Junior Member
			
			
			
			
				
					
						
					
				
			
			 
			
				
				
				
				
				
					    
				
			
		 
		
			
				
				
				
					Add client event to sever side
				
				
						
						
				
					
						
							How to add client event to sever side, Please explain with simple sample code or example
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
- 
	
	
		
			
			
				Junior Member
			
			
			
			
				
					
						
					
				
			
			 
			
				
				
				
				
				
					    
				
			
		 
		
			
				
				
				
					Re: Add client event to sever side
				
				
						
						
				
					
						
							For example to add javascript function( ex: sample )  to  onclick event of button in server side
ButtonName.Attributes.Add("OnClick","Sample()")
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
- 
	
	
		
			
			
				Expert Member
			
			
			
			
				
					
						
					
				
			
			 
			
				
				
				
				
				
					    
				
			
		 
		
			
				
				
				
					Re: Add client event to sever side
				
				
						
						
				
			 
			
			
		 
	 
		
	
 
                                             
- 
	
	
		
			
			
				Junior Member
			
			
			
			
				
					
						
					
				
			
			 
			
				
				
				
				
				
					    
				
			
		 
		
			
				
				
				
					Re: Add client event to sever side
				
				
						
						
				
					
						
							Hi,
 You have To write it on pageLoad event 
ButtonName.Attributes.Add("OnClick","Sample()")
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
- 
	
	
		
			
			
				Contributing Member
			
			
			
			
				
					
						
					
				
			
			 
			
				
				
				
				
				
					    
				
			
		 
		
			
				
				
				
					Re: Add client event to sever side
				
				
						
						
				
					
						
							Hi,
You have to wrt client attchement for the server controls in Page_Init not in Page_Load before loding the page to the browser only u have to add the functions to the controls.
Regards,
Hari Prasad
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
		
		
		
	
 
	
	
	
	
	
	
	
	
	
	
	
	
		
		
			
				
				Posting Permissions
			
			
				
	
		- You may not post new threads
 
		- You may not post replies
 
		- You may not post attachments
 
		- You may not edit your posts
 
		-  
 
	
	
	Forum Rules