scriptmanager

The name 'ScriptManager' does not exist in the current context

旧街凉风 提交于 2019-12-10 14:07:34
问题 I copied some code to solve a problem with running JavaScript after an AJAX postback in ASP.Net. Unfortunately the new code gave me the following error when doing a build: The name 'ScriptManager' does not exist in the current context Now I've used the ScriptManager before, so why would it be giving me problems now? Isn't it available on all ASP.Net pages? I have a script manager on my master page after all... 回答1: I suppose there could be a number of things wrong that would generate this

HTTP Handler cannot find axd file in nested web application folder: Telerik RadScriptManager cannot find WebResource.axd in ~/admin/ folder

老子叫甜甜 提交于 2019-12-10 10:15:37
问题 We have a web application with 2 web.config files. I'm using the telerik:RadScriptManager control within an ASP.NET page. There is web resource file (WebResource.axd) that this control needs access to for it's ScriptReferences. I think this .axd file contains the JavaScript files for Telerik's controls. All of our Rad Controls are implemented in a separate web application (.csproj) project called "admin". The root web application project (.csproj) has a folder called "admin" where all of the

How to retain script block on a partial postback?

元气小坏坏 提交于 2019-12-10 04:13:23
问题 This is a problem I'm facing in a webapp I'm currently working on. So instead of cluttering the question with unrelated code, I recreated the problem in an isolated, simplified webapp that only demonstrates this issue. Hopefully this helps in finding a solution. I have a web user control with just this as its content: <% if (ShowAlertScript) { %> <script type="text/javascript"> function AlertMe() { alert('Hello World!'); } </script> <% } %> <input type="button" onclick="AlertMe()" value="Say

Advanced Scheduled Process/Task Manager - Linux

删除回忆录丶 提交于 2019-12-08 07:12:36
问题 Need some advice, I'm after a decent process/task manager for Ubuntu. Basically I have a few scripts/programs which I want to run as long running processes, but I want to shut them down at various periods (say over the weekend or every day for a few hours). During the time that the process needs to be up and crashes, I would like it so that the task scheduler will automatically restart the process. SO for example, I want to run program X between 9:00-17:00 every day. If the process is still

Date picker is not working with update panel

不问归期 提交于 2019-12-08 02:50:17
问题 My application is in asp.net 3.5 in which i am selecting date from date picker which is inside update panel. after selecting date and clicking on submit button page is post back. after post back when i try to select date once again i can`t see date picker there. //Code on aspx page <%@ Page Title="" Language="C#" MasterPageFile="~/Sample/MasterPage.master" AutoEventWireup="true" CodeFile="UpdateProblem.aspx.cs" Inherits="Sample_UpdateProblem" %> <asp:Content ID="Content1" ContentPlaceHolderID

How to execute javascript once an update panel refreshes (Can't get Sys.WebForms.PageRequestManager.getInstance().add_endRequest(); to work)

微笑、不失礼 提交于 2019-12-07 08:40:48
问题 I'm trying to run javascript once an update panel has refreshed. I've read a few places that you can use code similar to this: function codeToRun() { //Code Here } Sys.WebForms.PageRequestManager.getInstance().add_endRequest(codeToRun); But it doesn't seem to be working... any ideas? I've tried putting the code inside the Content area of the update panel as well as outside of it... haven't had any luck so far. Please let me know if you have any insight to why this might be happening. Thanks,

Using a ScriptManager in razor?

不打扰是莪最后的温柔 提交于 2019-12-07 06:47:41
问题 Must be a simple question, but I cannot for the life of me figure out how to include a script manager in my view. <asp:ScriptManager /> doesn't work. Anyone know? 回答1: ScriptManager is a webforms specific construct, so if you are using MVC, you won't (and shouldn't) be able to use it. You can look at http://mvcscriptmanager.codeplex.com/ if you want something that ports some of the features of the scriptmanager to MVC. 回答2: I ran into a similar situation upgrading a project. For "simple-ish"

RegisterClientScriptBlock parameters usages in real scenarios?

ⅰ亾dé卋堺 提交于 2019-12-06 19:16:30
问题 http://i.stack.imgur.com/dVjHt.jpg I never understood the real usage of the Control , type , key usages of this class. In general Ive always used with : this , GetType() , "xx" but now I truly want to understand . msdn : Control : " the control that is registering the client script" so...? what difference does it makes who registered it ? the script will be in the head of the page.. . Type : "the type of the client script block" type ??? its javascript. why does he want another type from me ?

WebUIValidation.js gets reloaded in async calls when in CompositeScript and UpdatePanel

空扰寡人 提交于 2019-12-06 08:29:06
问题 My scenario: I have a validator in an UpdatePanel . I want to combine my scripts so I am using CompositeScript in ScriptManager , and including a reference to WebUIValidation.js I am using .NET 4.0 My problem: When I asynchronously update the panel, .NET loads WebUIValidation.js (in a Scriptresource.axd file) in the async response, even though it has been loaded in the initial CompositeScript -generated script. This is a problem because I have custom code that hijacks some functions in

How to use ScriptManager in class file?

[亡魂溺海] 提交于 2019-12-06 08:25:30
问题 I Have a common method that displays alert message using page.clientScript. But later on i added update panel. Now this piece of code is not working. So I need to call there scriptmanager, but i get some error message that it is accessible there. Below is my ShowMessage method of common.cs file private static void ShowMessage(Page currentPage, string message) { var sb = new StringBuilder(); sb.Append("alert('"); sb.Append(message); sb.Append("');"); currentPage.ClientScript