scriptmanager

append versionnumber to asp:ScriptManager's compositescript tag

Hi, we are trying to get the following scenario working: we use asp:scriptmanager / CompositeScripts to combine our scripts into a few script blocks but after each deploy to the test system we have trouble with testers not getting updated versions of css and javascript (browser cache). For the CSS we have defined our own css user contr...

ScriptManager - binding HTML control events

Does ASP.NET's ScriptManager have any sort of "helper" for binding to HTML control events? This would be similar to jQuery: $('#foo').bind('click', function() { alert('User clicked on "foo."'); }); ...

Can a page have multiple ScriptManagers? If yes then under what condition will it be required ?

Can a page have multiple ScriptManagers? If yes then under what condition will it be required ? ...

Check if a javascript file is already loaded on a page

How to check in C# if a javascript file is already loaded on to the page? Let's say I have a user control in a different namespace that I load on to a page. I would like to see if a script file doesn't exist before I register it with the scriptmanager. ...

Asp.net Script manager conflicting with button

Hi there. I'm working on an asp.net app and I have some controls that are created dinamically on the OnInit event. One of that controls is an asp button that has been working fine until now. When I add a ScriptManager to my page, that same button is unnable to postback. It's only working if a take the ScriptManager out. has anything l...

WCF WebInvoke, Asp.net script using OPTIONS instead of POST Method

We have a WCF service in our web application which is being called by browser through ajax(jquery and asp.net scriptmanager) In this service some of the methods are WebGet and some of them are WebInvoke Problem is now any request to WebInvoke method through asp.net scriptmanager is making request using http 'OPTIONS' instead of 'POST'....

Getting Post-Back And No Update When Using ASP.NET AJAX

Hi. I am new to ASP.NET AJAX and am trying to get a status text box / button to allow users to update a status without a post-back. I have a script manager tag on the master page with "enablepartialrendering" set to "true". I also have an updatepanel tag on the content page. When I try this out, the page postbacks and nothing happens....

Unknown web method when using ajaxtoolkit:AutoCompleteExtender

Hi, Ik i use an ajaxtoolkit:AutoCompleteExtender on my page (ProductIndex.aspx) and use a scriptmethod in my codebehind i get an 500 Internal Server Error. The response in firebug is: POST http://slappebodem/Slappebodem/ProductIndex.aspx/GetCompletionList Response: Unknown web method GetCompletionList.Parameter name: m...

Register Javascript file to aspx page from WebReousrce

How do i add my javascript file as an embeded resource to the page after the ajax javascript already on the page? NB want to do this part dynamically to have code wrapped up in usercontrol. in aspx page: scriptmanager Code: Assembly: WebResource("Functions.js", "text/javascript") Code: onPreRender: ScriptManager.RegisterClientScrip...

Proper way to include scripts in an asp.net page

I've got an ASP.NET application that uses a mixture of ASP.NET AJAX (Including UpdatePanel) and jQuery written by several developers of differing backgrounds. Some included scripts within the ScriptManager itself <asp:ScriptManager><Scripts><asp:ScriptReference...., while others used Page.ClientScript.RegisterClientScriptInclude in the ...

ASP.NET script combiner returns blank response at times.

I am using a script manager for ASP.NET MVC to combine and compact CSS files and JavaScript files for pages on a website. For the most part this works as expected, however there are times (couple of times per week) when the HTTP handler responsible for returning the content returns an empty response and so pages load without any CSS - th...

When calling ScriptManager.RegisterStartupScript, what is the point of the 'Type' parameter?

A minor question that I hope admits of a simple answer that I'll kick myself for not noticing. So, when we have the following overload of RegisterStartupScript public static void RegisterStartupScript( Control control, Type type, string key, string script, bool addScriptTags ) we have to provide a type as well as...

ListView DataBound says Items > 0 when actually Items <= 0.

So I have a ListView (assignmentsListView) in an UpdatePanel, being filtered by a DropDownList in the same UpdatePanel. The DropDownList has a list of persons in it and uses autopostback, and the ListView shows the tasks those persons are assigned to. I am trying to use code similar to this: protected void assignmentsListView_DataBoun...

How do I get rid of the IE8 ssl warning message "Do you want to view only the webpage content that was delivered securely?” with ScriptManager?

A login page on our asp.net website uses https – while almost all of our other pages do not. On this login page, IE8 users receive the “Do you want to view only the webpage content that was delivered securely?” message. Many users press “Yes” out of habit which breaks our login page. I know the problem stems from the WebResource.axd a...

Problem with ScriptManager and ASP.NET AJAX Timer

Hello, I'm having a serious problem with my ASP.NET AJAX application. There is a javascript function in my application needs to be executed after the Timer_Tick event. Here's the code behind: void SetValues() { try { StringBuilder sbScript = new StringBuilder(); sbScript.Append("<script language='javascript' type='...

Microsoft JScript runtime error: Object expected

i am getting this error when the below condition match, i am using the below code in Content page and in my master page i have this <asp:ScriptManager EnablePartialRendering="true" EnablePageMethods="true" ID="smgr" runat="server" /> Error: Microsoft JScript runtime error: Object expected if (lstRecipient.Items[i].Text == ddlRe...

Cache ASP.NET Ajax ScriptManager scripts in the browser

Hi , i am using ScriptManager in my webpage. i am also using a lot of pagemethods in this page. When i look at the viewsource of the browser after the page has been rendered i find a lot of javascript which has been generated by the scriptmanager. how can i browser cache all these scripts so that they are not loaded everytime the page...

asp.net 4.0 sys is undefined horror

[edit]: Figured out where it goes wrong. It has something to do with my Routing (note: im not using MVC but webforms). Here's the little piece in my global.asax which causes it: routes.Add( "Home", new Route("{PageIndex}", new p7r.Routing.HomeRouteHandler()) ); Now this is the route for the hom...

How 'Sys._application' javascript error suddenly came up?

A javascript error suddenly came up throughout all files containing <asp:ScriptManager..>, error message is as below, Error: Sys.ArgumentTypeException: OBject of type 'Sys_Application' cannot be converted to type 'Sys._Application'/ Parameter name: instance I resolved the issue by adding 'ScriptMode="Release"' to ScriptMana...

ASP.NET: Custom control that outputs multiple hyperlinks. How do I register the ClientIDs for AJAX (UpdatePanel)?

I have a custom control which is rendered as a hyperlink: Public Class TestControl Inherits System.Web.UI.WebControls.WebControl Implements IPostBackEventHandler Public Sub RaisePostBackEvent(ByVal eventArgument As String) Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEvent Trace.WriteLine("Hyperlink 1...