scriptmanager

System.FormatException with ScriptManager

爱⌒轻易说出口 提交于 2019-12-11 18:32:15
问题 I'm using a ScriptManager in an ASP.NET page: <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> Since then, an error occurs each time I rebuilt my page (loads the assemblies): [FormatException: String was not recognized as a valid DateTime.] System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +3624418 System.Windows.Forms.TypeLibraryTimeStampAttribute..ctor(String timestamp) +49 System.Reflection.CustomAttribute._CreateCaObject

ScriptManager.RegisterStartupScript inside while loop only executed after breaking out of the loop

夙愿已清 提交于 2019-12-11 13:39:18
问题 I have a while loop in my codebehind and I want to monitor the progress, so each time I go into the loop, I wish my page draws something (a point) and when the loop breaks I would see the entire progress (scatterplot) My code is like the following: while (iter <= Common.maxIter) { ScriptManager.RegisterStartupScript(this, this.GetType(), "myFunc" + iter.ToString(), "Display()", true); //doing something else } The function Display() draws one point each time. My problem is, only after I break

call page method without script manager from jquery

怎甘沉沦 提交于 2019-12-11 13:26:16
问题 How to call page method from jquery without using scriptmanager 回答1: You can do it this way $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", dataType: "json", url: "webpage.aspx/methodName", data: "{id: '" + id + "'}", success: getTargetSuccess, error: getTargetFailure }); function getTargetSuccess(result,e) { var data = result.d; } function getTargetFailure(result,e) { } 回答2: Excellent guide here: http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax

Why ScriptManager causes postback on RequiredFieldValidator in ASP.NET (Web Forms)?

亡梦爱人 提交于 2019-12-11 12:26:14
问题 Before adding the ScriptManager when I was clicking on the login button it was showing the required field warning without page postback but after that it has started to do postback first and then validate fields. It's required to add a ScriptManager when there is an UpdatePanel on the page. How can I fix this so it doesn't postback on RequiredFieldValidator ? Login Page <form id="signinform" runat="server" defaultfocus="username" defaultbutton="LogInBtn"> <asp:scriptmanager id=

Modal Popup not working inside UpdatePanel

只谈情不闲聊 提交于 2019-12-11 10:15:36
问题 I have a gridview inside UpdatePanel. One of the column in gridview is link which when clicked should display modal (i am using zurb modal http://www.zurb.com/playground/reveal-modal-plugin). The problem is the modal only gets displayed only once when the link is clicked, the next time when the link is clicked it just refreshes the page. The modal should be displayed everytime when the link inside the gridview is clicked. Modal Script: function popupModal() { $("a.link").click(function (e) {

Call javascript code afer postback from an update panel

[亡魂溺海] 提交于 2019-12-11 08:26:45
问题 I read tis post but my problem still there. I try to execute a javascript multiple time on post back, and the script only execute the first time the page load. To make sure the script is register after each post back i use a guid for the javascript key name. var xyz = DateTime.Now.ToLongTimeString(); string script = @"BrokerCustomValue.value='" + CustomValueToBrokerListSerialized + "';alert('" + xyz + "');"; ScriptManager.RegisterStartupScript(this, GetType(), Guid.NewGuid().ToString(),

iPad 6_0_1 ScriptManager.SupportsPartialRendering ASP.Net

大兔子大兔子 提交于 2019-12-11 05:57:07
问题 We started to receive the below error a few months ago, it looks like mac os 6. Can someone help me shed some light on the below issue? We have a lot of partial rendering on our site, but it seems asp.net thinks ipad 6_0_1 cannot handle it. Event Target: ctl00$ScriptManager1 Exception: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: The page is performing an async postback but the

How to add Script in the Page <head></head> dynamically

筅森魡賤 提交于 2019-12-11 00:02:24
问题 I use asp.net 4 and c#. I have a Web User Control inside a Web From page. When I include the Web User Control I would like also include programmatically some script within the tags for the final generated page. Any idea how to do it? Maybe ScriptManager could help on this? Please provide me a sample of code I'm pretty new at developing thanks for your time on this! 回答1: Peter's answer will add to the page, but not the head element. Take a look at this article: http://weblogs.asp.net

ScriptManager.RegisterStartUpScript(…) not working

半腔热情 提交于 2019-12-10 18:17:58
问题 I've used this command since I start my new project on ImageButton_Click Event, and it's working perfect in every page that I'm using this: I first, check if there's a field empty if yes then I send this alert . ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('No Empty fields are allowed.');", true); What I'm doing here: I have 2 textboxes that I type two dates, these dates are used to fill my reportviewer , but before it goes to the reportviewer , I check if it's

'Sys.WebForms.PageRequestManager' is null or not an object

喜夏-厌秋 提交于 2019-12-10 16:37:57
问题 Hi I have an aspx page in which i have the following code <asp:ScriptManager ID="scriptManager" runat="server" AsyncPostBackTimeout="500" EnablePageMethods="true"> </asp:ScriptManager> <script type="text/javascript"> Sys.Application.add_init(BeginRequestHandler); Sys.Application.add_init(EndRequestHandler); Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); function