asp.net-ajax

ASP.NET Ajax: close window after Ajax call?

你说的曾经没有我的故事 提交于 2019-12-11 06:58:35
问题 I'm using ASP.NET Ajax. How can I tell the browser to close the current window after the server call finishes (server-side code)? I managed to do this using the ASP.NET Ajax's ScriptManager method "RegisterDataItem" in the server method (inside a button click handler): sm.RegisterDataItem(ActionLabel, "action:closewindow") and a hidden Label and handling it this way on the client: function PageLoadingHandler(sender, args) { var dataItems = args.get_dataItems(); if (dataItems['ActionLabel'] ==

Getting a hidden field from an Iframe into container page

北城以北 提交于 2019-12-11 06:43:25
问题 I have an ASP page that contains an iframe. I'll call it the main page. I need to set a hidden field's value in the main page once the iframe has finished loading. The iframe is an ASP page that has a hidden field that is set during its page_load. It then needs to pass this value into a hidden field on the main page. I have an onLoad hander in the iframe page calling a javascript method in the main frame. I had to put a delay in the function where it addresses some telerik controls because it

Method Error 500

霸气de小男生 提交于 2019-12-11 06:39:46
问题 I have a webservice for ajax cascading dropdownextender. Which is working fine. But suddenly it raised a exception. MethodError 500. What is this exception. Can any one resolve this exception. Please post a possible solution. Its an urgent requirement. 回答1: A 500 normally just means that there was an exception in the server side code, which wasn't handled. You'll need to trace/log through the webservice to see what is failing. You're almost certainly looking for a .Net code error. 回答2: 500

Session State persists across multiple computers

杀马特。学长 韩版系。学妹 提交于 2019-12-11 06:32:10
问题 Im sure it has nothing to do with persistance across Multiple Computers but seems quirky that a second website visit, would trigger a refresh of question & answers that are dynamically loaded to be displayed within a Ajax update panel. Session Interaction and logging Web.Config: <sessionState mode="InProc" cookieless="UseCookies" timeout="20" cookieName="ASPNET_Quiz" /> Global.asax: Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) Session("test") = "true" 'Used only to create a

How can the UpdatePanel's ContentTemplate be hidden while an UpdateProgress is being used?

萝らか妹 提交于 2019-12-11 06:07:45
问题 What is the easiest way to hide the Contents of an Update Panel when the UpdateProgress is invoked? 回答1: Here is a nice example doing this using Ajax Control Toolki <ajaxToolkit:UpdatePanelAnimationExtender ID="ae" runat="server" TargetControlID="up"> <Animations> <OnUpdating> ... </OnUpdating> <OnUpdated> ... </OnUpdated> </Animations> </ajaxToolkit:UpdatePanelAnimationExtender> * TargetControlID - ID of the UpdatePanel whose updates are used to play the animations (this is also the default

Using Multiview inside UpdatePanel (doesn't update the view!)

吃可爱长大的小学妹 提交于 2019-12-11 06:07:26
问题 I have a simple test app to test if its possible to change the active view in a Multiview control in an Ajax manner. I've used UpdatePanel for that. The request is made in an Ajax maner. The active view is changed in code, but I don't see the result in the client browser! It never changes the activeview. heres the example code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="tabsTest2.aspx.cs" Inherits="tabsTest2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http

ASP.NET MVC: Ajax.Actionlink Does not work with parameters

Deadly 提交于 2019-12-11 06:07:20
问题 <%= Ajax.ActionLink("DrillDown", "EventOverzichtAjax", new { GroepID = Model.GroepID.ToString(), groepType = Model.GroepType.ToString(), manager = Model.isManager }, new AjaxOptions { UpdateTargetId = Model.GroepID.ToString(), OnBegin = string.Format("beginOverzichtFetch('{0}')", Model.GroepID), OnComplete = string.Format("completeOverzichtFetch('{0}')", Model.GroepID)}) %> I'm having some issues with the onBegin and onComplate properties. They work perfectly as i want. But they do not when i

Ajaxcontroltoolkit watermark extender timer blink

随声附和 提交于 2019-12-11 05:54:01
问题 I've an ASP.NET page on which I've 1 Timer (Tick event is trigger for update panel) 1 Update Panel 1 Label (in Update Panel) 1 TextBox 1 WaterMark extender (for TextBox) The textbox and watermarkextander are out of the updatepanel, there are some other object in page but I am not listing them, the timer don't affect them. When I write something in textbox there is no problem but when the textbox is empty and the watermarkextender is active on timer tick the watermark text is blinking. What

Error with Ajax.Beginform on ASP.NET MVC Page

旧城冷巷雨未停 提交于 2019-12-11 05:44:55
问题 I am using Ajaxy Call to load the partial view. It is working fine in Firefox and IE without in Debug Mode. But in Debug mode, I am getting the follwoing error: Error: 'Sys' is undefined Ajaxy call Code: <% using (Ajax.BeginForm("SearchResults", new AjaxOptions { UpdateTargetId = "divLoadSearchResults" } )) {%> HTML View Source corresponding to this: <form action="/Home/SearchResults" method="post" onclick="***Sys.***Mvc.AsyncForm.handleClick(this, new Sys.UI.DomEvent(event));" onsubmit="Sys

Parse Error while using ScriptManager

醉酒当歌 提交于 2019-12-11 05:24:43
问题 I have a web application that was working fine two days before. When I moved this web site to another machine, then facing following problem. In my web page, I have declared ScriptManager as: <asp:ScriptManager ID="scriptMgr" runat="server"> </asp:ScriptManager> And when I visit the web page, I am getting this error: The base class includes the field 'scriptMgr', but its type (System.Web.UI.ScriptManager) is not compatible with the type of control (System.Web.UI.ScriptManager). And on another