postback

ASP.net not posting back to correct page

怎甘沉沦 提交于 2019-12-25 01:07:14
问题 So I have a slightly unorthodox application type. I have an aspx page called AddNewBlog.aspx. This page generates XML data from database queries and it include the file AddNewBlogXSL.aspx which is an xsl style sheet. The effect is that the AddNewBlog XML data is transformed by AddNewBlogXSL on the client side into XHTML. So although the requested page is AddNewBlog.aspx, the layouts and controls and forms are on AddNewBlogXSL.aspx since it contains all the layout and formatting. When on

Retaining dynamically created controls during PostBack - VB.net

戏子无情 提交于 2019-12-24 19:33:45
问题 I have a panel with a form that has a drop down list with values 1-10. When a button on the panel is pressed, that panel is made invisible and a second made visible. On the second panel I have rows of controls being generated dynamically. The number of rows is determined by the selecteditem on the drop down list. My problem is that when I want to carry out validation and then storing of the values of the contents of controls that are dynamically created, the controls are removed. I understand

JavaScript: Determine which control caused postback

眉间皱痕 提交于 2019-12-24 15:00:25
问题 I am currently developing a web site using ASP.NET 3.5. On a page there are some situations I don't want that a specific control will cause a postback to the server. I wrote a function to return false if that condition is met which will be called when the onsubmit-Event occurs. But I somehow need to determine which control will cause the postback, because the postback should be cancelled only if this specific control caused it under certain conditions. How it is possible to do that? Thanks

SignalR Update Panel Only Works First Time

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 12:37:32
问题 I have the following code inside of an update panel. When the screen loads, the SignalR code works fine. However, after the first time, once I click a button, the SignalR code does not fire anymore until I cause a redirect back to the page. Basically what I am doing is when the user clicks the preview button, it fires off the reporting process. An Ajax modal popup is displayed with a progress indicator and a cancel button. If the user clicks the cancel button, the cancelation token is set,

Postback Security

大城市里の小女人 提交于 2019-12-24 11:42:42
问题 I've been working with jQuery and *.asmx web services lately, and I'm trying to be security-conscious in doing so. I figure it would be possible to submit an AJAX request -- even when logged-out -- to a resource that should only be accessible while logged-in. Thus, I include special keys and hashes with each of these AJAX requests in order to validate the user's state before performing certain server-side actions. HOWEVER I always assumed that Postbacks were safe in that regard. That .NET

JQueryMobile dialog shows twice because of a postback

穿精又带淫゛_ 提交于 2019-12-24 10:07:17
问题 I have an asp.net page with a timer embedded in an UpdatePanel (UpdateMode="Conditional", ChildrenAsTriggers="false"). The timer is responsible for updating some components of that page every few seconds. There are also some HyperLink controls on the page and they open a JQueryMobile dialog when clicked (data-rel="dialog"). The problem is that the timer i mentioned causes postback every few seconds. So when a dialog is opened and then closed, the first such postback after then causes the

In ASP.NET, how to hook postback event on clientside

百般思念 提交于 2019-12-24 09:58:47
问题 I want to run a code on every postback on client-side. Is there an event or something to do that? 回答1: If you just handle a form's submit event, you won't necessarily catch every __doPostBack() . A __doPostBack() that triggers an UpdatePanel refresh doesn't submit the form, for example. One way that you can make sure you know about every call to __doPostBack() is to redefine it: var oldDoPostBack = __doPostBack; function __doPostBack(eventTarget, eventArgs) { // Your code here, which will

asp.net Link button image not visible after postback

旧巷老猫 提交于 2019-12-24 03:29:51
问题 I have a link button with image and label inside it. After postback, the image and label is not visible. < asp:LinkButton ID="AddNewRunLinkButton" runat="server" CssClass="Navigationlocalnav" OnClick="AddNewRunLinkButton_Click" >   < img id="Img1" src="../../Images/add_newIcon.gif" runat="server" alt="Add New Run" /> < asp:Label ID="addText" Text=" Add New Run" runat="server"></asp:Label> < /asp:LinkButton> This link button is used to import/export data. I have added an attribute on click of

Are public properties in an ASP.NET code behind supposed to persist between page loads?

时光总嘲笑我的痴心妄想 提交于 2019-12-24 02:45:10
问题 I am trying to capture the HTTP_REFERER upon page_load event of an ASP.NET page, and persist it between postbacks until I need it later. The way I trying to do this isn't working: public partial class About : System.Web.UI.Page { public string ReferringPage { get; set; } protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ReferringPage = Request.ServerVariables["HTTP_REFERER"]; } } protected void ImageButton1_Click( object sender, ImageClickEventArgs e) { Response

AsyncPostBackTrigger works only the first time

本小妞迷上赌 提交于 2019-12-24 01:51:11
问题 I have an update panel that includes a gridview. This grid has a drop down list column. Beta aspx code: <asp:UpdatePanel ID="UpdatePanel1" runat="server" EnablePartialRendering="false" UpdateMode="Conditional"> ... <asp:GridView ID="Gv_Queue" runat="server"> <Columns> <asp:TemplateField HeaderText="H"> <ItemTemplate> <asp:DropDownList ID="ddl_proprietà" runat="server" OnSelectedIndexChanged="ddl_proprietà_SelectedIndexChanged" AutoPostBack="true"/> </ItemTemplate> </Columns> </asp:GridView <