Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

Remove JavaScript __doPostBack function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Waldy - 09 May 2008 14:43 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.