Search Results

Search found 428 results on 18 pages for 'updatepanel'.

Page 4/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • AJAX Control Toolkit - Incompatibility with HTMLEditor and UpdatePanel

    - by Guilherme Cardoso
    Unfortunately HTMLEditor component of AJAX Control Toolkit is not compatible with the UpdatePanel. The problem is when we use accents with the Mozilla Firefox browser and HTMLEditor is inside an UpdatePanel. Letters that contain accents are left with an unknown character (so is stored in the database or even returned a PostBack). Can be tested using Mozilla Firefox on the site of the ASP.NET AJAX Control Toolkit.  Write a word with accents and go to "Submit Content": http://www.asp.net/AJAX/AjaxControlToolkit/Samples/HTMLEditor/HTMLEditor.aspx As an alternative to this problem there are multiple component Rich Text Editors, some using jQuery and others not. Queneeshas provided us a list of 10 components that can be viewed here: http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors Hopefully next release of the AJAX Control Toolkit, this inconsistency and others (like the ModalPopup Extender that already referenced in my blog) are resolved once and for all. This is because there are more updated versions prior to that do not have these problems, and with the passing of time some parts were coming into conflict. If you know of any alternative or want to know at this problem, you can visit the topic I created the section of the AJAX Control Toolkit in ASP.NET forum: http://forums.asp.net/p/1548141/3848763.aspx

    Read the article

  • FileUpload and UpdatePanel: ScriptManager.RegisterPostBackControl works the second time.

    - by VansFannel
    Hello. I'm developing an ASP.NET application with C# and Visual Studio 2008 SP1. I'm using WebForms. I have an ASPX page with two UpdatePanels, one on the left that holds a TreeView and other on the right where I load dynamically user controls. One user control, that I used on right panel, has a FileUpload control and a button to save that file on server. The ascx code to save control is: <asp:UpdatePanel ID="UpdatePanelBotons" runat="server" RenderMode="Inline" UpdateMode="Conditional"> <ContentTemplate> <asp:Button ID="Save" runat="server" Text="Guardar" onclick="Save_Click" CssClass="button" /> </ContentTemplate> <Triggers> <asp:PostBackTrigger ControlID="Save" /> </Triggers> </asp:UpdatePanel> I make a full postback to upload the file to the server and save it to database. But I always getting False on FileUpload.HasFile. I problem is the right UpdatePanel. I need it to load dynamically the user controls. This panel has three UpdatePanels to load the three user controls that I use. Maybe I can use an Async File Uploader or delete the right Update Panel and do a full postback to load controls dynamically. Any advice? UPDATE: RegisterPostBackControl works... the second time I click on save button. First time FileUpload.HasFile is FALSE, and second time is TRUE. Second Update On first click I also check ScriptManager.IsInAsyncPostBack and is FALSE. I don't understand ANYTHING!! Why? The code to load user control first time, and on each postback is: DynamicControls.CreateDestination ud = this.LoadControl(ucUrl) as DynamicControls.CreateDestination; if (ud != null) { Button save = ud.FindControl("Save") as Button; if (save != null) ScriptManager1.RegisterPostBackControl(save); PanelDestination.Controls.Add(ud); } Thank you.

    Read the article

  • How to limit the number of post values on UpdatePanel ?

    - by Aristos
    I have notice that the UpdatePanel post every field included on the form on every trigger. But in most of my cases I use 2-3 UpdatePanels at the same page, and each one is independent. When I click for update the one panel, then my page receive all the input data of the page (ok this is logical) but I won to read only this UpdatePanels data and act according, and not the other panels data. So I see that a lot of traffic is happened this way. So is there a way to say to one UpdatePanel - send only my input data, and not everything found on the page. ? Thank you in advanced.

    Read the article

  • How to configure a GridView CommandField to trigger Full Page Update in UpdatePanel

    - by Frinavale
    I have 2 user controls on my page. One is used for searching, and the other is used for editing (along with a few other things). The user control that provides the search functionality uses a GridView to display the search results. This GridView has a CommandField used for editing (showEditButton="true"). I would like to place the GridView into an UpdatePanel so that paging through the search results will be smooth. The thing is that when the user clicks the Edit Link (the CommandField) I need to preform a full page postback so that the search user control can be hidden and the edit user control can be displayed. Edit: the reason I need to do a full page postback is because the edit user control is outside of the UpdatePanel that my GridView is in. It is not only outside the UpdatePanel, but it's in a completely different user control. I have no idea how to add the CommandField as a full page postback trigger to the UpdatePanel. The PostBackTrigger (which is used to indicate the controls cause a full page postback) takes a ControlID as a parameter; however the CommandButton does not have an ID...and you can see why I'm having a problem with this. Update on what else I've tried to solve the problem: I took a new approach to solving the problem. In my new approach, I used a TemplateField instead of a CommandField. I placed a LinkButton control in the TemplateField and gave it a name. During the GridView's RowDataBound event I retrieved the LinkButton control and added it to the UpdatePanel's Triggers. This is the ASP Markup for the UpdatePanel and the GridView <asp:UpdatePanel ID="SearchResultsUpdateSection" runat="server"> <ContentTemplate> <asp:GridView ID="SearchResultsGrid" runat="server" AllowPaging="true" AutoGenerateColumns="false"> <Columns> <asp:TemplateField> <HeaderTemplate></HeaderTemplate> <ItemTemplate> <asp:LinkButton ID="Edit" runat="server" Text="Edit"></asp:LinkButton> </ItemTemplate> </asp:TemplateField> <asp:BoundField ...... </Columns> </asp:GridView> </ContentTemplate> </asp:UpdatePanel> In my VB.NET code. I implemented a function that handles the GridView's RowDataBound event. In this method I find the LinkButton for the row being bound to, create a PostBackTrigger for the LinkButton, and add it to the UpdatePanel's Triggers. This means that a PostBackTrigger is created for every "edit" LinkButton in the GridView Edit: this did not create a PostBackTrigger for Every "edit" LinkButton because the ID is the same for all LinkButtons in the GridView. Private Sub SearchResultsGrid_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles SearchResultsGrod.RowDataBound If e.Row.RowType = DataControlRowType.Header Then ''I am doing stuff here that does not pertain to the problem Else Dim editLink As LinkButton = CType(e.Row.FindControl("Edit"), LinkButton) If editLink IsNot Nothing Then Dim fullPageTrigger As New PostBackTrigger fullPageTrigger.ControlID = editLink.ID SearchResultsUpdateSection.Triggers.Add(fullPageTrigger) End If End If End Sub And instead of handling the GridView's RowEditing event for editing purposes i use the RowCommand instead. Private Sub SearchResultsGrid_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles SearchResultsGrid.RowCommand RaiseEvent EditRecord(Me, New EventArgs()) End Sub This new approach didn't work at all because all of the LinkButtons in the GridView have the same ID. After reading the MSDN article on the UpdatePanel.Triggers Property I have the impression that Triggers can only be defined declaratively. This would mean that anything I did in the VB code wouldn't work. Any advise would be greatly appreciated. Thanks, -Frinny

    Read the article

  • How to create custom asp.net validator that works with UpdatePanel?

    - by Goran
    I think that subject summs it pretty well... I have created my custom validators that work great when I put them on page in design mode. However if I place them in a usercontrol, and then try to add this user control to the parent page via updatepanel, then my custom validators just won't trigger. They simply don't work. Does anyone have any clue on what I have to do here? .net 3.5

    Read the article

  • ConfirmButtonExtender using ModalPopupExtender fails in UpdatePanel after partial postback?

    - by Martin Emanuelsson
    Hello, We're trying to add a more fancy looking confirm messages than the regular JavaScript-confirm message to our delete-buttons in a list of comments on our site. To accomplish this we're trying to use the ConfirmButtonExtender together with a ModalPopupExtender. The comments are displayed using a ListView inside a UpdatePanel so that the paging of the ListView doesn't reload the entire page. Using the ConfirmButtonExtender works fine the first time the list is loaded but if we for instance go to the second page of comments using the pager, the ConfirmButtonExtender doesn't work anymore. The extender shows up when clicking Delete but when I click OK the page makes a full reload without triggering the delete event. Has anyone experienced the same problem and found a solution to it? Or can you recommend another way to accomplish the same thing? Best regards Martin Emanuelsson Göteborg, Sweden

    Read the article

  • Using UpdatePanels inside of a ListView

    - by Jim B
    Hey everyone, I'm wondering if anybody has run across something similar to this before. Some quick pseudo-code to get started: <UpdatePanel> <ContentTemplate> <ListView> <LayoutTemplate> <UpdatePanel> <ContentTemplate> <ItemPlaceholder /> </ContentTemplate> </UpdatePanel> </LayoutTemplate> <ItemTemplate> Some stuff goes here </ItemTemplate> </ListView> </ContentTemplate> </UpdatePanel> The main thing to take away from the above is that I have an update panel which contains a listview; and then each of the listview items is contained in its own update panel. What I'm trying to do is when one of the ListView update panels triggers a postback, I'd want to also update one of the other ListView item update panels. A practical implementation would be a quick survey, that has 3 questions. We'd only ask Question #3 if the user answered "Yes" to Question #1. When the page loads; it hides Q3 because it doesn't see "Yes" for Q1. When the user clicks "Yes" to Q1, I want to refresh the Q3 update panel so it now displays. I've got it working now by refreshing the outer UpdatePanel on postback, but this seems inefficient because I don't need to re-evaluate every item; just the ones that would be affected by the prerequisite i detailed out above. I've been grappling with setting up triggers, but i keep coming up empty mainly because I can't figure out a way to set up a trigger for the updatepanel for Q3 based off of the postback triggered by Q1. Any suggestions out there? Am I barking up the wrong tree?

    Read the article

  • Get controls ClientID/UniqueID between DetailsView and UpdatePanel

    - by robertpnl
    Hi guys, I like to know how to get the ClientID/UniqueID of a control inside a Detailsview controls EditItemTemplate element and when DetailsViews changing to Edit mode and DetailsView is inside a AJAX UpdatePanel. Without UpdatePanel, during PostBack I can get the ClientID's control, but now with an UpdatePanel. <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:DetailsView ID="DetailsView1" runat="server" DataSourceID="SqlDataSource1" AllowPaging="true" AutoGenerateEditButton="true"> <Fields> <asp:TemplateField> <EditItemTemplate> <asp:CheckBox runat="server" ID="chkboxTest" Text="CHECKBOX" /> </EditItemTemplate> </asp:TemplateField> </Fields> </asp:DetailsView> </ContentTemplate> </asp:UpdatePanel> As you see, the EditItemTemplate contains a Checkbox control. So i'm trying to get the ClientID of this checkbox when Detailsview is changing to the Edit mode. I need this value for handling Javascript. Catching the events ChangingMode/ChangedMode doesn't work; chkbox is null: void DetailsView1_ModeChanged(object sender, EventArgs e) { if (DetailsView1.CurrentMode == DetailsViewMode.Edit) var chkbox = DetailsView1.Rows[0].FindControl("chkxboxTest"); // <== is null } Maybe i'm using the wrong event? Someone can give me a tip about this? Thanks.

    Read the article

  • Queue ExternalInterface calls to Flash Object in UpdatePanel - Needs Improvement?

    - by Laramie
    A Flash (actually Flex) object is created on an ASP.Net page within an Update Panel using a modified version of the embedCallAC_FL_RunContent.js script so it can be written in dynamically. It is re-created with this script with each partial postback to that panel. There are also other Update Panels on the page. With some postbacks (partial and full), External Interface calls such as $get('FlashObj').ExternalInterfaceFunc('arg1', 0, true); are prepared server-side and added to the page using ScriptManager.RegisterStartupScript. They're embedded in a function and stuffed into Sys.Application's load event, for example Sys.Application.add_load(funcContainingExternalInterfaceCalls). The problem is that because the Flash object's state state may change with each partial postback, the Flash (Flex) object and/or External Interface may not be ready or even exist yet in the DOM when the JavaScript - Flash External Interface call is made. It results in an "Object doesn't support this property or method" exception. I have a working strategy to make the ExternalInterface calls immediately if Flash is ready or else queue them until such time that Flash announces its readiness. //Called when the Flash object is initialized and can accept ExternalInterfaceCalls var flashReady = false; //Called by Flash when object is fully initialized function setFlashReady() { flashReady = true; //Make any queued ExternalInterface calls, then dequeue while (extIntQueue.length > 0) (extIntQueue.shift())(); } var extIntQueue = []; function callExternalInterface(flashObjName, funcName, args) { //reference to the wrapped ExternalInterface Call var wrapped = extWrap(flashObjName, funcName, args); //only procede with ExternalInterface call if the global flashReady variable has been set if (flashReady) { wrapped(); } else { //queue the function so when flashReady() is called next, the function is called and the aruments are passed. extIntQueue.push(wrapped); } } //bundle ExtInt call and hold variables in a closure function extWrap(flashObjName, funcName, args) { //put vars in closure return function() { var funcCall = '$get("' + flashObjName + '").' + funcName; eval(funcCall).apply(this, args); } } I set the flashReady var to dirty whenever I update the Update Panel that contains the Flash (Flex) object. ScriptManager.RegisterClientScriptBlock(parentContainer, parentContainer.GetType(), "flashReady", "flashReady = false;", true); I'm pleased that I got it to work, but it feels like a hack. I am still on the learning curve with respect to concepts like closures why "eval()" is apparently evil, so I'm wondering if I'm violating some best practice or if this code should be improved, if so how? Thanks.

    Read the article

  • Gridview and Modal popup not updating

    - by rs
    I have page with following controls <asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <uc2:CountryControl ID="Country1" runat="server" /> <br class = "br_e" /> <br class = "br_e" /> <asp:UpdatePanel ID="upCountry2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Panel runat="server" ID="pnCountry" Width="400px" Visible="false"> <asp:GridView ID="gvCountry" runat="server" AllowSorting="true" DataKeyNames="countryid" DataSourceID="data_country1" AutoGenerateColumns="false"> <Columns> <asp:CommandField ButtonType="Link" ShowDeleteButton="true" /> <asp:BoundField HeaderText="Country" DataField="CountryName" SortExpression="CountryName" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="data_country1" runat="server" ConnectionString="<%$ zyx %>" SelectCommand="xyz" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:SessionParameter Name="country" DefaultValue="" ConvertEmptyStringToNull="true" SessionField="CountryID" Type="String" /> </SelectParameters> </asp:SqlDataSource> </asp:Panel> </ContentTemplate> </asp:UpdatePanel> </ContentTemplate> </asp:UpdatePanel> My user control is a modal popup to select country and add selected ids to a session variable. And in main page bind data using ids in session variable.Gridview - on deleting event i'm deleting that id from session and on deleted event updating both user control using a refresh method (Country1.Refresh()) and gridview panel. But updatepanel is not getting updated and even modalpopup is also not getting refreshed. What could be wrong here? Even though update and refresh events are fired and executed, why is page not getting updated?

    Read the article

  • AsyncPostBackTrigger disables buttons...

    - by afsharm
    I've a simple UpdatePanel and a button outside of it. I've introduced the button as an AsyncPostBackTrigger in the UpdatePanel. UpdatePanel itself works fine but the button does not. Whenever the button is clicked, its click handler does not run just like the button is not clicked at all! Why the button is not working and how can it be fixed? UPDATE: here is the markup: <asp:UpdatePanel ID="upGridView" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:GridView ID="grdList" SkinID="SimpleGridView" DataKeyNames="Key" runat="server" AllowPaging="True" PageSize="15" AutoGenerateColumns="False" Caption="<%$ Resources: CommonResources, grdListCaption %>" EmptyDataText="<%$ Resources: CommonResources, grdListEmptyDataText %>" OnRowEditing="grdList_RowEditing" OnPageIndexChanging="grdList_PageIndexChanging" OnRowCreated="grdList_RowCreated"> <Columns> </Columns> </asp:GridView> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnDelete" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="btnNew" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="btnForward" EventName="Click" /> </Triggers> </asp:UpdatePanel> <asp:Button ID="btnDelete" runat="server" SkinID="Button" Text="<%$ Resources: CommonResources, btnDelete %>" OnClick="btnDelete_Click" /> <asp:Button ID="btnNew" runat="server" SkinID="Button" Text="<%$ Resources: CommonResources, btnNew %>" OnClick="btnNew_Click" /> <asp:Button ID="btnForward" runat="server" SkinID="Button" meta:resourcekey="btnForward" OnClick="btnForward_Click" />

    Read the article

  • Refresh a control on the master page after postback

    - by Andreas
    Hi all! What i am trying to do here is to show a couple of validation messages in form of a bulletlist, so i have a Div on my master page containing a asp:bulletlist. Like this: <div> <asp:BulletedList ID="blstValidationErrorMessage" runat="server" BulletStyle="Disc"> </asp:BulletedList> </div> When i then click the Save button from any of my pages (inside the main contentPlaceHolder) i create a list of messages and give this list as datasouce like this: blstValidationErrorMessage.DataSource = validationMessageCollection; blstValidationErrorMessage.DataBind(); The save button is located inside an updatepanel: asp:UpdatePanel runat="server" ID="UpdatePanel" ChildrenAsTriggers="true" UpdateMode="Conditional" Nothing happens, i can see that the datasource of the bulletlist contains X items, the problems must arise because the Save button is inside an update panel and the elements outside this updatepanel (master page controls for example) is not refreshed. So my question is, how do i make the bulletlist refresh after the postback? Thanks in advance.

    Read the article

  • nested updatepanels

    - by Elenor
    When I put nested updatepanels in outer updatepanel, then in code, it shows that outer panel is around the code of all nested panels while design mode shows outer updatepanel is drawn like one row on top of page and nested updatepanels are drawn below that outside of outer updatepanel. Is this normal behavior or there is some problem in my implementation?

    Read the article

  • where to use update panel

    - by Rohit
    I have a custom treeview which i create programmatically as there is a need of specific layout which is not achievable using asp.net treeview.It is on a master page.When i click on treenodes the content area refreshes after a postback.There is a page category.aspx which is a content page of this master page.I have a user control in that content area named products.aspx.Now i want to use ajax to prevent the postback which happens when i click on treenode.I tried putting user control in updatepanel and treeview as well in updatepanel but to no awail. How to use updatepanel in this scenerio.

    Read the article

  • AsyncPostBackTrigger Just flashing/flicking the UpdatePanel but not updating it

    - by Pankaj
    I am trying UpdatePanel & AsyncPostBackTrigger on master pages through find control method but problem is when I click on button (UpdateButton) It just flash/flick (No Postback) the UpdatePanle but still it don't update or refresh the gridview (images) inside the updatePanel. I have placed script Manger on the master page & an AJAX Update panel in a ContentPlaceHolder in the child page. Also, in another ContentPlaceholder there is an asp button (outside of the UpdatePanel). I want to refresh/reload the AJAX UpdatePanel with this asp button. Thanks for suggestions. Child Page Code :- protected void Page_Load(object sender, EventArgs e) { ScriptManager ScriptManager1 = (ScriptManager)Master.FindControl("ScriptManager1"); ContentPlaceHolder cph = (ContentPlaceHolder)Master.FindControl("cp_Button"); Button btnRefresh = (Button)cph.FindControl("btnRefresh"); ScriptManager1.RegisterAsyncPostBackControl(btnRefresh); } protected void btnRefresh_Click(object sender, EventArgs e) { UpdatePanel1.Update(); } <%@ Page Title="" Language="C#" MasterPageFile="~/InnerMaster.master" AutoEventWireup="true" CodeFile="A.aspx.cs" Inherits="A" Async="true" %> <asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server"> <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server"> <ContentTemplate> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id" DataSourceID="SqlDataSource1"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:Image ID="img12" runat="server" Width="650px" Height="600" ToolTip="A" ImageUrl='<%# Page.ResolveUrl(string.Format("~/Cli/{0}", Eval("image"))) %>' /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </ContentTemplate> </asp:UpdatePanel> </asp:Content> <asp:Content ID="Content4" ContentPlaceHolderID="cp_Button" Runat="Server"> <asp:Button ID ="btnRefresh" runat="server" onclick="btnRefresh_Click" Height="34" Width="110" Text="More Images" /> </asp:Content> Hi updated code :- Now on click event whole pages is refreshed. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; namespace EProxy { public class EventProxy : Control, IPostBackEventHandler { public EventProxy() { } public void RaisePostBackEvent(string eventArgument) { } public event EventHandler<EventArgs> EventProxied; protected virtual void OnEventProxy(EventArgs e) { if (this.EventProxied != null) { this.EventProxied(this, e); } } public void ProxyEvent(EventArgs e) { OnEventProxy(e); } } } On Master Page Code (btn click):- protected void btnRefresh_Click(object sender, EventArgs e) { ContentPlaceHolder cph = (ContentPlaceHolder)this.FindControl("MainContent"); EventProxy eventProxy = (EventProxy)cph.FindControl("ProxyControl") as EventProxy; eventProxy.ProxyEvent(e); } Web Config :- <pages maintainScrollPositionOnPostBack="true" enableViewStateMac="true"> <controls> <add tagPrefix="it" namespace="EProxy" assembly="App_Code"/> </controls> </pages>

    Read the article

  • How to use an UpdatePanel inside a Reapeater ItemTemplate with a HTML Table

    - by vanslly
    I want to allow the user to edit by data by row, so only need content updated by row. I managed to achieve this by using a Repeater with a UpdatePanel in the ItemTemplate. Using a div <asp:ScriptManager ID="ctlScriptManager" runat="server" /> <asp:Repeater ID="ctlMyRepeater" runat="server"> <ItemTemplate> <div> <asp:UpdatePanel ID="ctlUpdatePanel" runat="server"> <ContentTemplate> <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' /> <asp:LinkButton ID="btnRename" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Rename">Rename...</asp:LinkButton> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnRename" EventName="Click" /> </Triggers> </asp:UpdatePanel> </div> </ItemTemplate> </asp:Repeater> But, I want to use a table to ensure structure and spacing and CSS styling wasn't doing it for me, but when I use a table everything goes whacky. Using a Table <asp:ScriptManager ID="ctlScriptManager" runat="server" /> <table> <asp:Repeater ID="ctlMyRepeater" runat="server"> <ItemTemplate> <asp:UpdatePanel ID="ctlUpdatePanel" runat="server"> <ContentTemplate> <tr> <td> <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' /> </td> <td> <asp:LinkButton ID="btnRename" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Rename">Rename...</asp:LinkButton> </td> </tr> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnRename" EventName="Click" /> </Triggers> </asp:UpdatePanel> </ItemTemplate> </asp:Repeater> </table> What's the best way to solve this problem? I prefer using a table, because I really want to enfore structure without reliance on CSS. Thanks in advance.

    Read the article

  • UpdatePanel and ModalPopup Extender

    - by rs
    I have my form designed as <asp:Panel runat="server" Id="xyz"> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> 'Gridview with edit/delete - opens detailsview(edit template) with data for editing </ContentTemplate> </asp:UpdatePanel> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> <ContentTemplate> 'Hyperlink to open detailsview(insert template) for inserting records </ContentTemplate> </asp:UpdatePanel> </asp:Panel> <asp:Panel runat="server" Id="xyz1"> 'Ajax modal popup extender control </asp:Panel> It works perfectly when i click update, insert alternately, but when i click insert hyperlink (which is outside gridview) and close/cancel popup without any insert and then again click insert it doesn't call insert_onclick event. It works if i click some other button and click this button. What could be causing this issue and how can i solve it?

    Read the article

  • Issue with Multiple ModalPopups, ValidationSummary and UpdatePanels

    - by Aaron Hoffman
    I am having an issue when a page contains multiple ModalPopups each containing a ValidationSummary Control. Here is the functionality I need: A user clicks a button and a Modal Popup appears with dynamic content based on the button that was clicked. (This functionality is working. Buttons are wrapped in UpdatePanels and the partial page postback calls .Show() on the ModalPopup) "Save" button in ModalPopup causes client side validation, then causes a full page postback so the entire ModalPopup disappears. (ModalPopup could disappear another way - the ModalPopup just needs to disappear after a successful save operation) If errors occur in the codebehind during Save operation, messages are added to the ValidationSummary (contained within the ModalPopup) and the ModalPopup is displayed again. When the ValidationSummary's are added to the PopupPanel's, the ModalPopups no longer display correctly after a full page postback caused by the "Save" button within the second PopupPanel. (the first panel continues to function correctly) Both PopupPanels are displayed, and neither is "Popped-Up", they are displayed in-line. Any ideas on how to solve this? Image of Error State (after "PostBack Popup2" button has been clicked) ASPX markup <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <%--********************************************************************* Popup1 *********************************************************************--%> <asp:UpdatePanel ID="Popup1ShowButtonUpdatePanel" runat="server"> <ContentTemplate> <%--This button will cause a partial page postback and pass a parameter to the Popup1ModalPopup in code behind and call its .Show() method to make it visible--%> <asp:Button ID="Popup1ShowButton" runat="server" Text="Show Popup1" OnClick="Popup1ShowButton_Click" CommandArgument="1" /> </ContentTemplate> </asp:UpdatePanel> <%--Hidden Control is used as ModalPopup's TargetControlID .Usually this is the ID of control that causes the Popup, but we want to control the modal popup from code behind --%> <asp:HiddenField ID="Popup1ModalPopupTargetControl" runat="server" /> <ajax:ModalPopupExtender ID="Popup1ModalPopup" runat="server" TargetControlID="Popup1ModalPopupTargetControl" PopupControlID="Popup1PopupControl" CancelControlID="Popup1CancelButton"> </ajax:ModalPopupExtender> <asp:Panel ID="Popup1PopupControl" runat="server" CssClass="ModalPopup" Style="width: 600px; background-color: #FFFFFF; border: solid 1px #000000;"> <%--This button causes validation and a full-page post back. Full page postback will causes the ModalPopup to be Hid. If there are errors in code behind, the code behind will add a message to the ValidationSummary, and make the ModalPopup visible again--%> <asp:Button ID="Popup1PostBackButton" runat="server" Text="PostBack Popup1" OnClick="Popup1PostBackButton_Click" />&nbsp; <asp:Button ID="Popup1CancelButton" runat="server" Text="Cancel Popup1" /> <asp:UpdatePanel ID="Popup1UpdatePanel" runat="server"> <ContentTemplate> <%--*************ISSUE HERE*************** The two ValidationSummary's are causing an issue. When the second ModalPopup's PostBack button is clicked, Both ModalPopup's become visible, but neither are "Popped-Up". If ValidationSummary's are removed, both ModalPopups Function Correctly--%> <asp:ValidationSummary ID="Popup1ValidationSummary" runat="server" /> <%--Will display dynamically passed paramter during partial page post-back--%> Popup1 Parameter:<asp:Literal ID="Popup1Parameter" runat="server"></asp:Literal><br /> </ContentTemplate> </asp:UpdatePanel> &nbsp;<br /> &nbsp;<br /> &nbsp;<br /> </asp:Panel> &nbsp;<br /> &nbsp;<br /> &nbsp;<br /> <%--********************************************************************* Popup2 *********************************************************************--%> <asp:UpdatePanel ID="Popup2ShowButtonUpdatePanel" runat="server"> <ContentTemplate> <%--This button will cause a partial page postback and pass a parameter to the Popup2ModalPopup in code behind and call its .Show() method to make it visible--%> <asp:Button ID="Popup2ShowButton" runat="server" Text="Show Popup2" OnClick="Popup2ShowButton_Click" CommandArgument="2" /> </ContentTemplate> </asp:UpdatePanel> <%--Hidden Control is used as ModalPopup's TargetControlID .Usually this is the ID of control that causes the Popup, but we want to control the modal popup from code behind --%> <asp:HiddenField ID="Popup2ModalPopupTargetControl" runat="server" /> <ajax:ModalPopupExtender ID="Popup2ModalPopup" runat="server" TargetControlID="Popup2ModalPopupTargetControl" PopupControlID="Popup2PopupControl" CancelControlID="Popup2CancelButton"> </ajax:ModalPopupExtender> <asp:Panel ID="Popup2PopupControl" runat="server" CssClass="ModalPopup" Style="width: 600px; background-color: #FFFFFF; border: solid 1px #000000;"> <%--This button causes validation and a full-page post back. Full page postback will causes the ModalPopup to be Hid. If there are errors in code behind, the code behind will add a message to the ValidationSummary, and make the ModalPopup visible again--%> <asp:Button ID="Popup2PostBackButton" runat="server" Text="PostBack Popup2" OnClick="Popup2PostBackButton_Click" />&nbsp; <asp:Button ID="Popup2CancelButton" runat="server" Text="Cancel Popup2" /> <asp:UpdatePanel ID="Popup2UpdatePanel" runat="server"> <ContentTemplate> <%--*************ISSUE HERE*************** The two ValidationSummary's are causing an issue. When the second ModalPopup's PostBack button is clicked, Both ModalPopup's become visible, but neither are "Popped-Up". If ValidationSummary's are removed, both ModalPopups Function Correctly--%> <asp:ValidationSummary ID="Popup2ValidationSummary" runat="server" /> <%--Will display dynamically passed paramter during partial page post-back--%> Popup2 Parameter:<asp:Literal ID="Popup2Parameter" runat="server"></asp:Literal><br /> </ContentTemplate> </asp:UpdatePanel> &nbsp;<br /> &nbsp;<br /> &nbsp;<br /> </asp:Panel> Code Behind protected void Popup1ShowButton_Click(object sender, EventArgs e) { Button btn = sender as Button; //Dynamically pass parameter to ModalPopup during partial page postback Popup1Parameter.Text = btn.CommandArgument; Popup1ModalPopup.Show(); } protected void Popup1PostBackButton_Click(object sender, EventArgs e) { //if there is an error, add a message to the validation summary and //show the ModalPopup again //TODO: add message to validation summary //show ModalPopup after page refresh (request/response) Popup1ModalPopup.Show(); } protected void Popup2ShowButton_Click(object sender, EventArgs e) { Button btn = sender as Button; //Dynamically pass parameter to ModalPopup during partial page postback Popup2Parameter.Text = btn.CommandArgument; Popup2ModalPopup.Show(); } protected void Popup2PostBackButton_Click(object sender, EventArgs e) { //***********After This is when the issue appears********************** //if there is an error, add a message to the validation summary and //show the ModalPopup again //TODO: add message to validation summary //show ModalPopup after page refresh (request/response) Popup2ModalPopup.Show(); }

    Read the article

  • ASP.NET AJAX or jQuery (UpdatePanel/ScriptManager or UFrame/jQuery.ajax)

    - by Mark Redman
    Hi, We use the asp.net UpdatePanel and the ScriptManager/ScriptManagerProxy for ajax related functionality; reducing full page refreshes and calling WCF Services respectively. we also use jQuery and plugins for some parts of the UI. We have had some issues with javascript library related conflicts, but have come across some posts indicating that there is a lot more overhead using the UpdatePanel. I have found some limited reference to UFrame: http://www.codeproject.com/KB/aspnet/uframe.aspx www.codeplex.com/uframe Is this a commercially viable replacement for the asp.net UpdatePanel? We use a ScriptManagerProxy to reference WCF services and easily create and use a proxy to call the various WCF service methods. Would using jQuery ajax be a more efficient solution here? We have got this working well on various browsers but now seem to be getting some security related issues (as seen in FF Firebug: Access to restricted URI denied" code: "1012) which seem to have started since using jQuery a lot more. Is it possible/viable to not use ASP.NET Ajax at all?

    Read the article

  • ASP.NET Performance tip- Combine multiple script file into one request with script manager

    - by Jalpesh P. Vadgama
    We all need java script for our web application and we storing our JavaScript code in .js files. Now If we have more then .js file then our browser will create a new request for each .js file. Which is a little overhead in terms of performance. If you have very big enterprise application you will have so much over head for this. Asp.net Script Manager provides a feature to combine multiple JavaScript into one request but you must remember that this feature will be available only with .NET Framework 3.5 sp1 or higher versions.  Let’s take a simple example. I am having two javascript files Jscrip1.js and Jscript2.js both are having separate functions. //Jscript1.js function Task1() { alert('task1'); } Here is another one for another file. ////Jscript1.js function Task2() { alert('task2'); } Now I am adding script reference with script manager and using this function in my code like this. <form id="form1" runat="server"> <asp:ScriptManager ID="myScriptManager" runat="server" > <Scripts> <asp:ScriptReference Path="~/JScript1.js" /> <asp:ScriptReference Path="~/JScript2.js" /> </Scripts> </asp:ScriptManager> <script language="javascript" type="text/javascript"> Task1(); Task2(); </script> </form> Now Let’s test in Firefox with Lori plug-in which will show you how many request are made for this. Here is output of that. You can see 5 Requests are there. Now let’s do same thing in with ASP.NET Script Manager combined script feature. Like following <form id="form1" runat="server"> <asp:ScriptManager ID="myScriptManager" runat="server" > <CompositeScript> <Scripts> <asp:ScriptReference Path="~/JScript1.js" /> <asp:ScriptReference Path="~/JScript2.js" /> </Scripts> </CompositeScript> </asp:ScriptManager> <script language="javascript" type="text/javascript"> Task1(); Task2(); </script> </form> Now let’s run it and let’s see how many request are there like following. As you can see now we have only 4 request compare to 5 request earlier. So script manager combined multiple script into one request. So if you have lots of javascript files you can save your loading time with this with combining multiple script files into one request. Hope you liked it. Stay tuned for more!!!.. Happy programming.. Technorati Tags: ASP.NET,ScriptManager,Microsoft Ajax

    Read the article

  • Using C# FindControl to find a user-control in the master page

    - by Jisaak
    So all I want to do is simply find a user control I load based on a drop down selection. I have the user control added but now I'm trying to find the control so I can access a couple properties off of it and I can't find the control for the life of me. I'm actually doing all of this in the master page and there is no code in the default.aspx page itself. Any help would be appreciated. MasterPage.aspx <body> <form id="form1" runat="server"> <div> <asp:ScriptManager runat="server"> </asp:ScriptManager> </div> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false" OnLoad="UpdatePanel2_Load"> <ContentTemplate> <div class="toolbar"> <div class="section"> <asp:DropDownList ID="ddlDesiredPage" runat="server" AutoPostBack="True" EnableViewState="True" OnSelectedIndexChanged="goToSelectedPage"> </asp:DropDownList> &nbsp; <asp:DropDownList ID="ddlDesiredPageSP" runat="server" AutoPostBack="True" EnableViewState="True" OnSelectedIndexChanged="goToSelectedPage"> </asp:DropDownList> <br /> <span class="toolbarText">Select a Page to Edit</span> </div> <div class="options"> <div class="toolbarButton"> <asp:LinkButton ID="lnkSave" CssClass="modal" runat="server" OnClick="lnkSave_Click"><span class="icon" id="saveIcon" title="Save"></span>Save</asp:LinkButton> </div> </div> </div> </ContentTemplate> <Triggers> </Triggers> </asp:UpdatePanel> <div id="contentContainer"> <asp:UpdatePanel ID="UpdatePanel1" runat="server" OnLoad="UpdatePanel1_Load" UpdateMode="Conditional" ChildrenAsTriggers="False"> <ContentTemplate> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="lnkHome" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="rdoTemplate" EventName="SelectedIndexChanged" /> </Triggers> </asp:UpdatePanel> </div> MasterPage.cs protected void goToSelectedPage(object sender, System.EventArgs e) { temp1 ct = this.Page.Master.LoadControl("temp1.ascx") as temp1; ct.ID = "TestMe"; this.UpdatePanel1.ContentTemplateContainer.Controls.Add(ct); } //This is where I CANNOT SEEM TO FIND THE CONTROL //////////////////////////////////////// protected void lnkSave_Click(object sender, System.EventArgs e) { UpdatePanel teest = this.FindControl("UpdatePanel1") as UpdatePanel; Control test2 = teest.ContentTemplateContainer.FindControl("ctl09") as Control; temp1 test3 = test2.FindControl("TestMe") as temp1; string maybe = test3.Col1TopTitle; } Here I don't understand what it's telling me. for "par" I get "ctl09" and I have no idea how I am supposed to find this control. temp1.ascx.cs protected void Page_Load(object sender, EventArgs e) { string ppp = this.ID; string par = this.Parent.ID; }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >