postback

Postback is not working in Safari in Windows 7

痴心易碎 提交于 2019-12-01 09:50:40
问题 Our QA team reported that one of our applications is not working in Safari in Windows 7. After checking the problem we figured out that any postback event is not working. After some tries we found that Page.IsPostback() reports false and thinks it’s a first-time load of the page and postback did not include ViewState. We tried many solutions including ASP.Net postback problem with ViewState in Safari on Windows 7 Viewstate invalid when using Safari ViewState Chunking in ASP.NET 2.0

ASP javascript radiobutton enable disable not included in postback ajax

半世苍凉 提交于 2019-12-01 08:57:08
问题 Here is the problem. I have a radiobutton group (two radiobuttons). These guys are initialy disabled. When the user clicks a checkbox, I dynamically enable radiobuttons in javascript by setting rbtn.disabled = false; and doing the same for it's parent (span element) so it correctly works in IE. The problem is that these dynamically enabled radiobuttons are not returned on postback (I see rbtn.Checked == false on serverside and request.form does not contain proper value). Why is this happening

Prevent Postback when user clicks browser's back button

爷,独闯天下 提交于 2019-12-01 08:24:13
I have a web page that sends email to multiple users (online distribution list). After the submit button is clicked and the email is sent, a status page is shown listing how many emails were sent, errors, and other information. If the user clicks the back button, the email is resent. How can I prevent this? NOTE: The browser DOES prompt the user to "resubmit" or "resend" data to the page before actually sending the email, but that does not stop my users from clicking it and then wondering why two copies of the email were sent out. Environment: Server: C#, ASP.NET 2.0, IIS6 Client: any browser

Prevent Postback when user clicks browser's back button

自作多情 提交于 2019-12-01 07:52:40
问题 I have a web page that sends email to multiple users (online distribution list). After the submit button is clicked and the email is sent, a status page is shown listing how many emails were sent, errors, and other information. If the user clicks the back button, the email is resent. How can I prevent this? NOTE: The browser DOES prompt the user to "resubmit" or "resend" data to the page before actually sending the email, but that does not stop my users from clicking it and then wondering why

GridView.DataSource is null during PostBack

僤鯓⒐⒋嵵緔 提交于 2019-12-01 07:36:42
问题 i want to implement a print / download csv from each Gridview in my application. Those get their data by Datasources or directly by gvSample.DataSource = Data; gvSample.DataBind(); Now my first approach was setting a Download-Button into the Footer-Template and handle the Download there <asp:GridView ID="gvSample" runat="server"> <PagerTemplate> <asp:ImageButton ImageUrl="~/download.gif" OnClick="dl_Click" runat="server" ID="dl"/> </PagerTemplate> </asp:GridView> and protected void dl_Click

Stop postback on TextChanged

岁酱吖の 提交于 2019-12-01 07:04:16
I have a textbox in an aspx page that has a TextChanged event attached to it. I also have a validator attached to the textbox. When the text is changed, the validate triggers but in case there is an error the textchanged event is still called. Do you know if it's possible to stop the postback on textchanged if the validator fires? <asp:TextBox ID="txtQuantity" runat="server" AutoPostBack="true" ontextchanged="txtQuantity_TextChanged"></asp:TextBox> <asp:RequiredFieldValidator ID="reqQuantity" ControlToValidate="txtQuantity" runat="server" ErrorMessage="The quantity is mandatory."></asp

Determine if and which partial postback occurred in pageLoad() with JavaScript in .NET

隐身守侯 提交于 2019-12-01 06:31:28
As I understand it, partial page updates with ASP.NET AJAX cause the JavaScript pageLoad() event handler to be invoked. My question: Is there a generic way of determining in JavaScript from within the pageLoad() function... i) If the postback was a partial page update or not. ii) If so, which panel was updated. My application uses a combination of .NET UpdatePanels & Telerik RadAjaxPanels. I'm looking for a generic (preferably JavaScript) solution which doesn't require me to specify a unique client-side callback function for each panel, nor set some flag from within each postback event handler

Getting control that fired postback in page_init

荒凉一梦 提交于 2019-12-01 05:25:09
问题 I have a gridview that includes dynamically created dropdownlist. When changing the dropdown values and doing a mass update on the grid (btnUpdate.click), I have to create the controls in the page init so they will be available to the viewstate. However, I have several other buttons that also cause a postback and I don't want to create the controls in the page init, but rather later in the button click events. How can I tell which control fired the postback while in page_init? __EVENTTARGET =

PHP: on select change, post form to self

青春壹個敷衍的年華 提交于 2019-12-01 05:14:40
It's basically what the title says.. I have a form with a select control that I want to force the form to post back to self on change. $bmsclientlist = $clientobj->getBMSClientList(); echo '<form name="changebmsid" method="post" action="' . $_SERVER['PHP_SELF'] . '"><select name="bmsid">'; foreach($bmsclientlist as $bmsclient) { $var = ''; if($client['bmsid'] == $bmsclient['id']) { $var = ' selected="selected"'; } echo '<option value="' . $bmsclient['id'] .'"'. $var .'>' .$bmsclient['clientname'] . '</option>'; } echo '</select></form>'; $backupobj = new AdminBackup(); if(isset($_POST['bmsid']

GridView loses data during postback

妖精的绣舞 提交于 2019-12-01 04:05:06
I have an aspx.Page containing a gridview. The gridview is bound in code behind to a datasource only when no postback takes place and has enableviewstate = true (The page too). During a postback, the data bound to the gridview are lost. What could be the reason. Please ask if code is needed. Solved it, problem was I made a Page.Databind() in the Page_Load event of the masterpage of the page with the gridview, so it bound the gridview during each postback without data. Thanks for all efforts. This is by design. This data is not stored anywhere natively from page load to page load. You will need