tags:

views:

24

answers:

1

Can any one help me out..

On click event on row I need to load the usercontrol? using Jquery..

I have tow Differnt userControls I need to load one user control in other user control on Cilcking on each row..

Thanks

A: 

You can not explicitly load a server side control from Javascript. You can however:

  1. Load all of your user controls on the page, having some of them initially hidden using CSS. Then, you can show them after clicking a row using Javascript/jQuery.
  2. Write a service that returns the same information that your user control to display, and format it with Javascript. Call the service when needed.
  3. Use an UpdatePanel to add your user control in the code behind. Although many people (including myself) frown upon UpdatePanels, they're easy to use with ASP.NET controls, so this might work out well for you.
wsanville
Thanks for your time, Please if you have sample code can you provide me? it will be great help for me..
kumar