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?

Re: Remove JavaScript __doPostBack function by darrel

darrel
Fri May 09 09:45:04 CDT 2008

> 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?

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



RE: Remove JavaScript __doPostBack function by brucebarker

brucebarker
Fri May 09 09:51:02 CDT 2008

_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" wrote:

> 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?
>
>
>

Re: Remove JavaScript __doPostBack function by Waldy

Waldy
Fri May 09 10:07:47 CDT 2008

"bruce barker" <brucebarker@discussions.microsoft.com> wrote in message
news:69E6FB4C-5C38-42CE-88F3-106A15080ABE@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?



Re: Remove JavaScript __doPostBack function by darrel

darrel
Fri May 09 10:14:21 CDT 2008


> 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