views:

357

answers:

1

Hi!

I wanna use a button in asp.net. When I ckick on it, an overlay shall occur and the overlay shall filled with data.

How Can I do this with Jquery?

My Problem is that, when I click on the button, the whole page is send back to server.

Thanks for your help!

+2  A: 

An asp:Button will create a postback when clicked. You can use JavaScript to prevent that, as @juraj suggests in a comment, by returning false at the end of the click function you bind to it.

Another option is to use an ordinary button instead on an asp button:

<input type='button' value='Click Me' id='justButton' />

You can also add such a button using the designer (if you prefer), under HTML > Input (Button).

Kobi