Missing __doPostback - help!

Discussion in 'ASP .Net Web Controls' started by James Radke, Dec 1, 2003.

  1. James Radke

    James Radke Guest

    Hello,

    I have a webform that I am modifying. After the modifications we have three
    visible buttons which perform a submit; and one invisible button. What I
    would like to do is to submit the invisible button from within a javascript
    function.

    I am used to doing this by calling the __doPostback function within the
    javascript; however since this page only has buttons on it, ASP.NET never
    generates the __soPostback function to the web page that is transmitted to
    the client - so , is there any way for me to call the submit of the
    invisible button from the javascript?

    Thanks!
     
    James Radke, Dec 1, 2003
    #1
    1. Advertising

  2. Hi James,

    How about adding a Linkbutton with no text as a way of tricking ASP.NET into
    rendering the __doPostback code?

    <asp:LinkButton id="LinkButton1" runat="server"></asp:LinkButton></P>

    Also, you might want to see if there's anything of use in this article:

    Generating Client-Side Script for Postback

    http://msdn.microsoft.com/library/d...eneratingclient-sidejavascriptforpostback.asp

    "James Radke" <> wrote in message
    news:...
    > Hello,
    >
    > I have a webform that I am modifying. After the modifications we have

    three
    > visible buttons which perform a submit; and one invisible button. What I
    > would like to do is to submit the invisible button from within a

    javascript
    > function.
    >
    > I am used to doing this by calling the __doPostback function within the
    > javascript; however since this page only has buttons on it, ASP.NET never
    > generates the __soPostback function to the web page that is transmitted to
    > the client - so , is there any way for me to call the submit of the
    > invisible button from the javascript?
    >
    > Thanks!
    >
    >
     
    Ken Cox [Microsoft MVP], Dec 2, 2003
    #2
    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. paul reed

    Wierd Behavior of __doPostBack

    paul reed, Jul 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    561
    Bassel Tabbara [MSFT]
    Jul 8, 2003
  2. Mike Dunn

    Overriding __doPostBack

    Mike Dunn, Jul 9, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    905
    vMike
    Jul 9, 2003
  3. =?Utf-8?B?TGFuY2UgQWhsYmVyZw==?=

    ASP.NET 2.0 Page with LinkButton & __doPostBack client side script missing

    =?Utf-8?B?TGFuY2UgQWhsYmVyZw==?=, May 6, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    992
    =?Utf-8?B?TGFuY2UgQWhsYmVyZw==?=
    May 6, 2004
  4. Jim O'Neill

    Missing __doPostBack function

    Jim O'Neill, Apr 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    898
    Jim O'Neill
    Apr 9, 2005
  5. William J. Familia
    Replies:
    0
    Views:
    2,263
    William J. Familia
    Feb 20, 2009
Loading...

Share This Page