postback

AsyncTask with a Updatepanel?

梦想的初衷 提交于 2019-12-01 23:28:26
Yo, i have created a WebProject to test if its possible to create a asyncTask to update a Progressbar: public partial class AsyncTest : System.Web.UI.Page { private String _taskprogress; private AsyncTaskDelegate _dlgt; protected delegate void AsyncTaskDelegate(); protected void Page_Load(object sender, EventArgs e) { } public String GetAsyncTaskProgress() { return _taskprogress; } public IAsyncResult OnBegin(object sender, EventArgs e, AsyncCallback cb, object extraData) { _taskprogress = "AsyncTask started at: " + DateTime.Now + ". "; _dlgt = new AsyncTaskDelegate(ReadFile); IAsyncResult

jQuery: form.submit(fn) does not work with Asp.net?

独自空忆成欢 提交于 2019-12-01 22:18:29
问题 I am trying to attach an event handler to form.submit on asp.net rendered pages with no success. I want to intercept every postback, and doc. says that I should be able. Am I doing something wrong? $(document).ready(function() { $("form").submit(function() { alert('Form submit'); debugger; }); }); 回答1: Don't know if you are still looking for it, but here is the solution I have. I don't think it works with event canceling if using, say, stopPropagation() but it will let you run some script

ASP.NET event order during postback or initial request

…衆ロ難τιáo~ 提交于 2019-12-01 21:51:12
Could I get some confirmations from the community that I'm not going mad, and that the life cycle of a page during post back is in deed in a different order to when the page is initally requested. If this is the case pointers towards references/articles outlining the order would be greatly appreciated. (A postback equivalent of the page life cycle image would be great) The behaviour is slightly different but the order is the same. In this respect "Postback" is essentially a state flag on the request. http://msdn.microsoft.com/en-us/library/ms178472.aspx (nice image btw) edit: thinking about it

How come form.reset() doesn't work after postback on this page?

南楼画角 提交于 2019-12-01 20:32:25
A student in my class brought this to my attention, and I didn't have an explanation for it-- and I couldn't find one after searching. After clicking the submit button, the reset button does not work. It's as if the browser prevents reset if the resource has been requested via post request. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <fieldset>

Maintaining Scroll Position and Selected Control on Postback

我怕爱的太早我们不能终老 提交于 2019-12-01 19:38:32
问题 Back with another web based issue. When a control issues a postback to the server the page refreshes (Fine). The page also scrolls back to the top and loses the control that is selected. If it's relevent after the postback depending on what changes have happened controls are made visible or made hidden. The focus is lost and current scroll resets even if nothing is changed on the page visibility wise. The data inputted in Text fields is kept and so are any radiobutton/checkbox selections. The

Sitecore: Turning on HTML Caching blocks postback behavior

北战南征 提交于 2019-12-01 19:04:10
I have a sitecore page with an ASP dropdownlist, and the data on the form is populated from the selected value of the dropdown. When the selected item of the dropdownlist is changed, a postback is fired. In the postback, the new selected item is added to the querystring and the user is redirected (for linkability). I recently enabled HTML caching (for all sublayouts, "Vary by querystring"), and now suddenly, this mechanism no longer works. What seems to happen is I select a new dropdown item, the page appears to post back (though if I'm debugging, none of my breakpoints get hit). After that,

Sitecore: Turning on HTML Caching blocks postback behavior

我的未来我决定 提交于 2019-12-01 19:00:23
问题 I have a sitecore page with an ASP dropdownlist, and the data on the form is populated from the selected value of the dropdown. When the selected item of the dropdownlist is changed, a postback is fired. In the postback, the new selected item is added to the querystring and the user is redirected (for linkability). I recently enabled HTML caching (for all sublayouts, "Vary by querystring"), and now suddenly, this mechanism no longer works. What seems to happen is I select a new dropdown item,

jQuery: form.submit(fn) does not work with Asp.net?

删除回忆录丶 提交于 2019-12-01 18:57:39
I am trying to attach an event handler to form.submit on asp.net rendered pages with no success. I want to intercept every postback, and doc. says that I should be able. Am I doing something wrong? $(document).ready(function() { $("form").submit(function() { alert('Form submit'); debugger; }); }); Don't know if you are still looking for it, but here is the solution I have. I don't think it works with event canceling if using, say, stopPropagation() but it will let you run some script before submitting the form. <script type="text/javascript"> $(function () { var oldSubmit = __doPostBack; var

.NET DropDownList SelectedIndexChange Event Not Firing in IE 10

徘徊边缘 提交于 2019-12-01 16:29:12
In IE 10, when a drop down list selected item is changed, nothing happens. It doesn't post back. All other controls work except for drop down lists. It appears to work when I switch to IE 10 compatibility mode. Scott Hanselman explains this on his blog. http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx Do you have the ASP.net Hotfix for IE10 installed? Ok, this was a weird issue. The actual problem was that we had a web.config sitting in the very root of the application that had OLD, I'm talking ANCIENT

User control inside update panel causing full page postback

 ̄綄美尐妖づ 提交于 2019-12-01 15:27:38
I have a user control with linkbuttons (used for paging) and a repeater inside an update panel. The paging works correctly, but is causing a full page postback every time I click through to the next page. The update panel looks like this: <asp:UpdatePanel ID="up1" runat="server" UpdateMode="Always"> <ContentTemplate> <asp:Repeater ID="rptOrganizations" runat="server"> <HeaderTemplate> <table> <thead> <tr> <th>Organization</th> <th>State</th> <th>Accredited Since</th> </tr> </thead> </table> </HeaderTemplate> <ItemTemplate> <tr> <td> <asp:Literal ID="ltlInstitution" runat="server" /> </td> <td>