Remove JavaScript __doPostBack function

W

Waldy

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

darrel

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
 
B

bruce barker

_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)
 
W

Waldy

bruce barker said:
_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?
 
D

darrel

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top