asp.net-ajax

ASP.NET - UpdatePanel and JavaScript

落花浮王杯 提交于 2019-12-28 11:52:23
问题 Is there a way to execute script when an UpdatePanel process is finished. I have a page that allows "inserting", "copying", and "editing" of a record. This is all done on an UpdatePanel to prevent a page navigation. Somewhere else on the page I would like to print a "flash" message - like "You have successfully entered a record." It is not near the UpdatePanel and I'd like to use a jQuery effect on the message so it fades out after 4 seconds. How can I send script back with the UpdatePanel or

jquery datepicker ms ajax updatepanel doesn't work after post back

爷,独闯天下 提交于 2019-12-28 05:29:28
问题 So I did some reading of the related questions and had some interesting stuff but did not find my answer, at least did not understand the answer. I am very new to AJAX, javascript and sclient side scripting in general. I have been using C# asp.net for a bit and recently added some updatepanels to my side to smooth so of the user controls and bits being updated so that the page was not reloaded each time. All works brilliantly and I was very happy with it till I decided to try and use some

ASP.NET MVC modal dialog/popup best practice

老子叫甜甜 提交于 2019-12-28 03:32:06
问题 I am looking for the most standard way to achieve modal dialogs in ASP.NET MVC. An example of what I am trying to do is when I select an item from my "list" page, I want the "details" page to be a popup over the list and NOT a new page. I'm not looking for a hack. I want it to be a solution that follows the ASP.NET MVC pattern. I would also prefer not stepping outside jQuery and ASP.NET Ajax (no plugins UNLESS it is emerging as a best practice). 回答1: Lunchy's dialog suggestion is nice. Just

How do I wait for a JavaScript __doPostBack call through Selenium and WebDriver

*爱你&永不变心* 提交于 2019-12-28 02:16:11
问题 I am facing a rare kind of issue while Automating through Selenium/Python while trying to fill out two fields on a website. My script fills out the first field i.e. ORIGIN CITY pretty fine. I have induced WebDriverWait for the second field DELIVERY ADDRESS . My guess the DELIVERY ADDRESS field is pretty much clickable even before the waiter is induced. But the ORIGIN CITY field have a JavaScript associated through onchange event as follows : onchange="javascript:setTimeout('__doPostBack(\

Json result is not displaying

廉价感情. 提交于 2019-12-25 19:49:07
问题 I am facing issue while displaying the result from a ajax call. Contrller json method which returns data from database. The control is coming in the success block of my ajax call but the data is empty. if i debug the controller GetNotifications method it is returning the data. Can somebody help me with this public JsonResult GetNotifications() { IList<Notification> notificationsBody = db.Notifications.ToList(); return Json(new { notificationsBody = notificationsBody }, JsonRequestBehavior

Create subdomain dynamically in ASP.NET

拟墨画扇 提交于 2019-12-25 18:24:56
问题 I want to create a sub-domain dynamically using C#. e.g., The domain name is www.example.com . How would I create a country sub domain dynamically based on region. For instance, I want to add India as the sub-domain using C# www.india.example.com . 回答1: This is simples alternative to do this: http://blog.maartenballiauw.be/post/2009/05/20/ASPNET-MVC-Domain-Routing.aspx http://lukesampson.com/post/303245177/subdomains-for-a-single-application-with-asp-net-mvc 来源: https://stackoverflow.com

UpdatePanel Timer causes all panels to update

核能气质少年 提交于 2019-12-25 14:25:15
问题 I have an ASP.NET web form with several UpdatePanels and I would like to have a timer that triggers only one of these UpdatePanels to update. I then want a separate UpdatePanel to update on the OnSelectedIndexChanged event of a DropDownList. The code I have will update the timer-triggered panel just fine, but when I change the index, the drop down-triggered panel will wait until the next timer tick to update. How can I have the drop down-triggered panel update instantaneously? Code below. C#:

ASP.NET MVC 2.0 articles for ViewModel and partial view, Edit Templates, Validations and Custom Binders

女生的网名这么多〃 提交于 2019-12-25 08:16:14
问题 I am very confused and scratching my head. I am trying to implement a complex page with many partial Views and Nested ViewModels, but somehow i am not able complete because of my limited understanding of technology. Please help me in understanding the below topics from asp.NET MVC 2 by providing good article/tutorials 1. Partial Views 2. Nested ViewModel 3. Custom ViewModel Binders. I would really appreciate your help as right now i am trying to implement them without proper understanding and

PageMethods failed on IIS 7.5 of Win 2008 R2 box

感情迁移 提交于 2019-12-25 05:37:09
问题 I have the following ASP.NET 4.0 code and it is running well on IIS 6.0 of the Win 2003 box. But When I pushed it to the Win 2008 R2 box(IIS 7.5 classic mode pool), it failed to onAddrLoadError. I am using Web Farms and maybe it is the web farms which caused this problem. I am also using SSL on the load balancer. <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server"></asp:ScriptManager> function AddEdit_onclick(id) { PageMethods.GetProduct(id, onAddrLoadSuccess,

Telerik ASP.NET AJAX: How to get value of a data bound column, client-side

北城余情 提交于 2019-12-25 05:36:08
问题 I want to obtain the value of a hidden control, that is a TreeListBoundColumn of a TreeList: <telerik:RadTreeList ID="rtlRshItems" ...> <Columns> <telerik:TreeListBoundColumn DataField="FtcPrevious" UniqueName="FtcPrevious" Visible="false" runat="server"> </telerik:TreeListBoundColumn> </Columns> </telerik:RadTreeList> This is what I have coded but does not work (although it comes from Telerik's forums) // Calculate the new FTC var treeList = $find("<%= rtlRshItems.ClientID %>"); var