View Complete Post
Hi guys,
I want to avoid page refereshing or loding with the help of jquery ajax. Here i am attatch my asp page code.
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Shared/NimbleSchedule_H1_F1_L1.master" CodeBehind="DepartmentWizard.aspx.cs" Inherits="DepartmentWizard" %> <%@ MasterType VirtualPath="~/Shared/NimbleSchedule_H1_F1_L1.master" %> <%@ Register Src="../Widgets/MyAccountNavigation.ascx" TagName="MyAccountNavigation" TagPrefix="NSMyAccountNavigation" %> <asp:Content ID="cntHeader" ContentPlaceHolderID="head" runat="Server"> <script type="text/javascript" src="../Scripts/jquery.js"></script> <script src="../Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $('[id$=lnkCancel]').click(function () { $('[id$=txtDepartmentName]').val(""); return false; }); $('#cntEmployee').load(function(evt){ evt.preventDefault(); $.ajax({ type: "P
Hi there,
I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.
But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.
Any idea?
Thanks in advance.
I try to do a ajax call via the jquery api.
The scritp :
$("#sortColumn").click(function(e) { var columnName = $(this).attr('name'); var sidx = columnName; var sord = '<%= (string)ViewData["sord"] == "asc" ? "desc" : "asc"%>'; //alert(sord); var page = '<%= ViewData["page"] %>'; var rows = "5"; $.ajax({ type: "POST", url: "/Mailings/GetData2", data: {'sidx': sidx ,'sord': sord ,'page': page ,'rows': rows }, contentType: "application/json; charset=utf-8", dataType: "json", success: function(response) { var jsonObject = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d; }, error: function(xmlHttpRequest, textStatus, errorThrown) { document.getElementById('infoContentHeader').innerHTML = xmlHttpRequest.responseText; } }); });
And the
Hello
Now I know that I won't be sending viewstate and eventvalidation in my ajax calls and that I will only want to send the actual form fields for efficiency purposes but I will need to know the answer to this question, to inform the more junior members of the team and my manager, so if anyone has any answers they are most welcome.
I have a simple form as follows
<form id="form1" runat="server"> <p>Field1: <
Hi,
I am using an ASP.Net AJAX application and I need to measure the performance of the AJAX call from the time it is invoked till page is rendered, including screen paint time.
I am using an update panel.
The screen paint time is critical since i want to record the time taken to render the output as well.
I have written web methods in code behind and I'm able to call them using PageMethods.(method name) in an ordinary aspx page.
If I'm trying to call the webmethods in a master page using PageMethods.(method name), it is throwing a jscript error pagemethods
is undefined.
My code is like this:
[System.Web.Services.WebMethod] public static string[] GetTimes() { dt1 = DateTime.Now; string[] a = { }; a[0] = dt1.ToUniversalTime().Subtract(new TimeSpan(5, 0, 0)).ToString("HH:mm"); a[1] = dt1.ToUniversalTime().ToString("HH:mm"); a[2] = dt1.ToUniversalTime().AddHours(0d).ToString("HH:mm"); a[3] = dt1.ToUniversalTime().AddHours(8d).ToString("HH:mm"); return a; }
<script language="javascript"> function UpdateNYCTime() { PageMethods.GetTimes(times, OnSucceeded); } function OnSucceeded(result, userContext, methodName) { $get('spanNYC').innerHTML = result[0].toString(); } </script>
Any Suggestions ? If I cannot call page methods from master page page, is there any another way of calling them ?
Thanks,
Sailaja
I got this flag that I am checking for authenticated signed in users:
<script type="text/javascript"> $(document).ready(function () { $('#test').click(function () { alert(flag()); }); }); function flag() { var _flag = "False"; $.ajax({ &n
Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend