button and post back

Discussion in 'ASP .Net' started by =?Utf-8?B?YmJkb2J1ZGR5?=, Jul 22, 2005.

  1. 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
     
    =?Utf-8?B?YmJkb2J1ZGR5?=, Jul 22, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?YmJkb2J1ZGR5?=

    Scott M. Guest

    Add onClick="javascript here" to the button.


    "bbdobuddy" <> wrote in message
    news:...
    > 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., Jul 22, 2005
    #2
    1. Advertising

  3. but what happens the code I want to write is Visual Basic.net code

    "Scott M." wrote:

    > Add onClick="javascript here" to the button.
    >
    >
    > "bbdobuddy" <> wrote in message
    > news:...
    > > 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

    >
    >
    >
     
    =?Utf-8?B?YmJkb2J1ZGR5?=, Jul 22, 2005
    #3
  4. =?Utf-8?B?YmJkb2J1ZGR5?=

    Scott M. Guest

    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.


    "bbdobuddy" <> wrote in message
    news:...
    > but what happens the code I want to write is Visual Basic.net code
    >
    > "Scott M." wrote:
    >
    >> Add onClick="javascript here" to the button.
    >>
    >>
    >> "bbdobuddy" <> wrote in message
    >> news:...
    >> > 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., Jul 22, 2005
    #4
  5. 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/d...rary/en-us/dnaspp/html/lifewithoutrefresh.asp

    You may also want to google AJAX (Asynchronous JavaScript and XML)

    sreejith





    "bbdobuddy" wrote:

    > 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
     
    =?Utf-8?B?U3JlZWppdGggUmFt?=, Jul 22, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joby
    Replies:
    0
    Views:
    1,664
  2. Ghafran Abbas
    Replies:
    0
    Views:
    4,314
    Ghafran Abbas
    Oct 12, 2004
  3. sylvia sil
    Replies:
    1
    Views:
    652
    Curt_C [MVP]
    Dec 29, 2004
  4. =?Utf-8?B?Z29yaWxsYQ==?=
    Replies:
    1
    Views:
    820
    Masudur
    May 25, 2007
  5. Hennie de Nooijer

    Back button and a Post form

    Hennie de Nooijer, Jul 15, 2003, in forum: Javascript
    Replies:
    1
    Views:
    112
    Evertjan.
    Jul 15, 2003
Loading...

Share This Page