webforms.js embedded resource

J

Jeremy Chapman

I'b developing a web app to be viewed on various mobile devices, and I want
the app to be as light as possible. I noticed that some of my pages have a
link to the embedded resource webforms.js in the rendered page. Is this
javascript required, and how can I turn it off?
 
V

Vadivel Kumar

It is pretty simple,

In Visual Studio, if you select the properties window of this particular
JS file, you can see a property called "Build Action". If you set this
property to "Content" then the file wont be added as a embedded
resource, so it means you have to manually specify the location when
ever you need to refer it.

-
Vadivel Kumar
http://vadivelk.net
 
J

Jeremy Chapman

when I say webforms.js, I'm referring to the resource in the system.web.dll
of the dotnet framework. The framework is including a link to this resource
on the rendered page (via a WebResource.axd url). I want to stop it from
adding this link to my page, because my page doesn't use any of the
javascript in this resource so it's an unneeded http get.
 
B

Ben Amada

Jeremy said:
when I say webforms.js, I'm referring to the resource in the
system.web.dll of the dotnet framework. The framework is including a
link to this resource on the rendered page (via a WebResource.axd url). I
want to stop it from adding this link to my page, because my page
doesn't use any of the javascript in this resource so it's an unneeded
http get.

I've seen these JavaScript AXD file(s) included when you set Form properties
such as 'defaultbutton' or 'defaultfocus'. Also the
'MaintainScrollPositionOnPostback' page directive might be adding an AXD
resource.

Ben
 
J

Jeremy Chapman

I've tried setting those properties to false or null in the page oninit, and
on page tag and in the web config. still no luck.
 

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,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top