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 - 09 May 2008 15:45 GMT
> 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
bruce barker - 09 May 2008 15:51 GMT
_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)
> 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?
Waldy - 09 May 2008 16:07 GMT
> _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 - 09 May 2008 16:14 GMT
> 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