Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Remove JavaScript __doPostBack function

0 views
Skip to first unread message

Waldy

unread,
May 9, 2008, 9:43:04 AM5/9/08
to
Hi there,
I have a customer requirement to provide a web application
without JavaScript. A function is being written to the HTML output on some
pages. The function is called __doPostBack. How do I get rid of it. There
is no call to the function in the rest of the page, so why is it being
written to the client?


darrel

unread,
May 9, 2008, 10:45:04 AM5/9/08
to

Have a link to the page to show us?

I believe that function is added by the .net framework. If it's not being
used by any of your controls (ie, you don't have AUTOPOSTBACK set to to
TRUE) then it won't necessarily hurt to have it there.

-Darrel


bruce barker

unread,
May 9, 2008, 10:51:02 AM5/9/08
to
_dopostback is rendered in three cases:

1) the page has a postback control that can only postback via javascript.
the only asp controls that don't need javascript to postback are the
asp:button and asp:imagebutton.

2) the page uses clientside validation. Set CauesValidation to false to turn
this off.

3) a command argument is specified for postback.

-- bruce (sqlwork.com)

Waldy

unread,
May 9, 2008, 11:07:47 AM5/9/08
to
"bruce barker" <bruce...@discussions.microsoft.com> wrote in message
news:69E6FB4C-5C38-42CE...@microsoft.com...

> _dopostback is rendered in three cases:
>

Thanks Bruce,
but surely in each of those cases, there would be a
call to the function somewhere in the HTML output?


darrel

unread,
May 9, 2008, 11:14:21 AM5/9/08
to

> but surely in each of those cases, there would be a
> call to the function somewhere in the HTML output?

I'm looking at some asp.net 1.1 pages I've built purposely without any
javascript and I don't have that function there. So I would imagine you
might have a control you've missed that requires it. Can you post a link to
the page in question?

-Darrel


0 new messages