Hi,
Is there a way that when a button is clicked that it will run code without
doing a post back?
I have a button that when it is clicked a message box pops up from the
javascript event onbeforeunload.
However, I would like to be able to click the button and run some code
without the message box poping up
Any help would be appreciated
Brian
Scott M. - 22 Jul 2005 19:52 GMT
Add onClick="javascript here" to the button.
> Hi,
>
[quoted text clipped - 9 lines]
> Any help would be appreciated
> Brian
bbdobuddy - 22 Jul 2005 20:00 GMT
but what happens the code I want to write is Visual Basic.net code
> Add onClick="javascript here" to the button.
>
[quoted text clipped - 11 lines]
> > Any help would be appreciated
> > Brian
Scott M. - 22 Jul 2005 20:18 GMT
You can't have client side code invoke server-side code without a post back
or a call to a new server page to process. There's just no way around this.
> but what happens the code I want to write is Visual Basic.net code
>
[quoted text clipped - 14 lines]
>> > Any help would be appreciated
>> > Brian
Sreejith Ram - 22 Jul 2005 23:04 GMT
In case you are looking for some thing like google suggest
((http://www.google.com/webhp?complete=1&hl=en) , to get server side code
execute without posting back the whole page, it is possible with XMLHTTP
there was recent MSDN article on this
http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/l
ifewithoutrefresh.asp
You may also want to google AJAX (Asynchronous JavaScript and XML)
sreejith
> Hi,
>
[quoted text clipped - 9 lines]
> Any help would be appreciated
> Brian