postback

Run a PHP postback request on a page only once?

三世轮回 提交于 2019-12-25 04:43:08
问题 I would like to know if there is an equivalent of IsPostBack in PHP. I want to call a function or a method only once, once the user is logged in. I have a facebook application, in which once the user authorizes the application it should enter his details in the database. This basic stuff should have been done using the post-authorize callback url which facebook pings when the user first authorizes the app. The issue is that since I am checking whether the user exists or not in index.php, I

ASP.NET Web Forms - Button not working inside <iframe> in IE9 and below

廉价感情. 提交于 2019-12-25 03:58:24
问题 I have an ASP.NET Web Forms page that has a form in it and I load it in an <iframe> as a popup. In all modern browsers it works great. In IE9 and below, however, things are weird. One file input element failed to open the file selection dialog when clicking on its browse button. After fixing this (with a JS trick), I saw another problem. Another button inside the form with this attribute for postback: onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnUpload", "

asp.net formview (using object datasource) postback insert

寵の児 提交于 2019-12-25 03:56:19
问题 I have a formview which using objectdatasource and default mode = insert... but after I inserted item if you refresh page inserting again and again....I tried Is.postback control but couldnt prevent this.Is there anyway to do it ? 回答1: That is a common fundamental problem, which is a little harder to solve. There are a couple of ways to deal with it. You could use a means to detecting a page refresh, like this: http://www.codeproject.com/Articles/68371/Detecting-Refresh-or-Postback-in-ASP-NET

TextBox Custom Attribute is Empty

笑着哭i 提交于 2019-12-25 03:55:24
问题 I am setting a custom attribute in the markup like this.. <asp:TextBox runat="server" guid="" ID="txtlocation1" type="text" class="autocomplete short-field require" name="location1" autocomplete="off" datasource="locations" /> Javascript sets the value of it and I am trying to read the value on button click like this... var val = txtlocation1.Attributes["guid"]; I always get an empty string.. any ideas? PS: I am not setting the attribute in code though. 回答1: custom attributes will not be sent

TextBox Custom Attribute is Empty

柔情痞子 提交于 2019-12-25 03:55:14
问题 I am setting a custom attribute in the markup like this.. <asp:TextBox runat="server" guid="" ID="txtlocation1" type="text" class="autocomplete short-field require" name="location1" autocomplete="off" datasource="locations" /> Javascript sets the value of it and I am trying to read the value on button click like this... var val = txtlocation1.Attributes["guid"]; I always get an empty string.. any ideas? PS: I am not setting the attribute in code though. 回答1: custom attributes will not be sent

Why does __LASTFOCUS hidden field show up on only some ASP.Net pages?

折月煮酒 提交于 2019-12-25 03:39:11
问题 I'd been using the hookonfocus method from this article: http://www.codeproject.com/KB/aspnet/MainatinFocusASPNET.aspx to maintain focus during postbacks for certain .aspx pages. However, I've noticed that several pages (and some very simple pages in a test project) don't include the hidden field __LASTFOCUS. I'm trying to figure out which options I'm missing that will cause this hidden field to show up and be used to restore focus if I use javascript to keep __LASTFOCUS up to date when focus

Dynamic usercontrol postback initialization

青春壹個敷衍的年華 提交于 2019-12-25 03:13:40
问题 I have a user control that loads other user controls dynamically. The issue is that on postback my controls don't exist. Now i'm under the impression i have to re-initialize them. Now to do this since they're UserControls and use the ascx file none of the UserControl's controls have been initialized in the empty constructor. Question: How do i load the UserControl's ascx file at this time? Currently i'm trying to do it like this: for (int i = 0; i < count; i++) { Control ctrl; if

Dynamic usercontrol postback initialization

折月煮酒 提交于 2019-12-25 03:13:38
问题 I have a user control that loads other user controls dynamically. The issue is that on postback my controls don't exist. Now i'm under the impression i have to re-initialize them. Now to do this since they're UserControls and use the ascx file none of the UserControl's controls have been initialized in the empty constructor. Question: How do i load the UserControl's ascx file at this time? Currently i'm trying to do it like this: for (int i = 0; i < count; i++) { Control ctrl; if

Receive post data from a 3rd party within a webview

假装没事ソ 提交于 2019-12-25 01:48:39
问题 Stuck on an issue with http post data. So we've created a webview to work in. Then called a third party webservice this ask's to provide a postback url and some parameters, the webservice then processes the paramaters and redirects the user (our app) to the postback url we provided, with some data as a http post. We want to get the post data from this postback url but within the webview or within our app. Tried intercepting the url load with this code: final WebView webview = new WebView(this

How to Read / Write or Preserve Fragment Identifiers on Post-back

╄→гoц情女王★ 提交于 2019-12-25 01:45:52
问题 I'm using fragment identifiers to run a tabbed browsing control and it would be nice if the post-back could preserve the tab as that is less jarring to the user. To that end I've been searching for a method to preserve the fragment identifier and am at a total loss. Is there a way to read or save the fragment identifier from the referring url during a page post-back in ASP.NET? 回答1: You can't save/retrieve URL fragments on the server side because Browsers don't send them -and they aren't