.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Post New Web Links

textbox not writable after partial postback of updatepanel

Posted By:      Posted Date: September 11, 2010    Points: 0   Category :ASP.Net
 
hi, i got a strange problem. my project was ok before implimenting ajax. i have just implimented ajax in one page only with Tabcontainer and updatepanels only nothing else. almost all controls are devided into different Tabs with respective update panels. mostly it is working ok. but the problem is : 1.   in some controls i am not able to write anything even the control is "Enabled=True" and focus is on the same control after partial postback. 2.   and as soon as i press Tab control goes to Address bar. 3.   some time tab key is also not working.Why ? here some code :<td style="width: 57684px; text-align: left">                                                Inception Date (dd-mm-yyyy)</td>                                            <td style="width: 604px; text-align: left">              &n


View Complete Post


More Related Resource Links

Full PostBack in IE and Partial PostBack in other browsers using an UpdatePanel

  

I have an UpdatePanel that works fine and always updates the content when the RadioButtonList selected index is changed. What I want to do, is trigger full page postback in IE, but allow the UpdatePanel to do partial page postback in all other browsers.

Here's my markup (I removed the internals of the UpdatePanel since they are not relavent):

<asp:UpdatePanel ID="uplPodcasts" ChildrenAsTriggers="false" UpdateMode="Conditional" runat="server">
        	    <ContentTemplate>
                    <div id="plPodcastsControls">
                	    <span style="font-weight: bold; line-height: 26px;">Display Mode:  </span>
                        <asp:RadioButtonList ID="rblPodcastsDisplay" CssClass="rblPodcastsDisplay" 
                            RepeatDirection="Horizontal" 
                            AutoPostBack="true"
                            runat="server">

                            <asp:ListItem Selected="true" Text="Table" Value="table" />
                            <asp:ListItem Text="Grid" Value="grid" />
                    

Button not preserving ID after partial postback in updatepanel?

  

I've created a dynamic button from another control outside of the update Panel.  The button is given an ID and such.  When the button is click, a postback occurs and I've re-created this button during Page_Init, Page_PreLoad, and Page_Onload and NONE of them is preserving the value. 


The only way for me to find the control was to look at the Page.request.form's allkeys and compare the string with a any text string that contains: Button.  Because I ID'd teh button as: ButtonRow_0Col0.  But the actual ID is null.  However, when traversing through page.request.form, the allkeys shows that ID with no problem.


So how come the actual ID is lost after a partial postback yet, the page.request.form's allkeys can pull out its allkey's value??

thanks


UpdatePanel - UpdateProgress only displays on initial postback

  

Hello

I'm having a somewhat odd issue, I'll do my best to explain it.

In a nutshell I have an UpdatePanel with an UpdateProgress item, first postback checks for warnings, if there are any they will be be displayed to the user as a JavaScript 'confirm' box. If the user clicks OK the next postback occurs to commit the change.

The UpdateProgress loading notification appears on the first postback but not on the second, even though both of them function correctly.  The buttons that trigger both postbacks are async postback triggers in the update panel, and both are inside the ContentTemplate.

It's not a huge problem, but it causes some confusion, has anybody ever seen this issue before?

Thanks


Rendering Partial view postback with data posted back and entire view context

  
This is the base Index.aspx view:<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <%@ Import Namespace="LMWebUI.Components" %> <%@ Import Namespace="LMWebUI.Models" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <% Session["HasScripts"] = "false"; %> <% if (Utility.FixNull(Session["LoggedIn"],"false") == "false" ) {%> <% ViewData["Login"] = new PartialRequest ( new { controller = "Account", action = "LogIn" } ); ((PartialRequest)ViewData["Login"]).Invoke(ViewContext); %> <%} else {%> <div>Logged In Content here</div> <%}%> <script type="text/javascript"> LMx.init(); </script> </asp:Content> This is a helper class> that I found elsewhere, doesn't solve the problem, but still works to display the viewpublic class PartialRequest { public RouteValueDictionary RouteValues { get; private set; } public PartialRequest(object routeValues

Problem with UpdatePanel postback

  
Hello,I have a Modal Popup window, inside an Update Panel object, that has the following layout:A Title areaA Content area with a tabstrip of 5 tabsA footer area with two buttons (Save and Cancel) and an UpdateProgressIn 3 of the five tabs I have:an UpdatePanel (UpdateMode=Conditional) that wrapsA collection of LinkButtons objectA gridviewAnother Panel object to be showed as a Nested Modal PopupNO update ProgressBoth the link collection and the gridview Select event will open the nested Modal window that contains a custom Usercontrol that is used to add new or edit object of the related gridview like in the code sample below//click handler of the LinkButton protected void btnNewPhone_Click(object sender, EventArgs e) { //Setup properties of the UserControl code omitted // ... //Show the nested Popup this.mpePopupPhone.Show(); } //handler for the gridview selectedIndex event protected void gvPhones_SelectedIndexChanged(object sender, EventArgs e) { //Setup properties of the UserControl code omitted // ... //Show the nested Popup this.mpePopupPhone.Show(); } Please note that: I am using the ModalPopupExtender show/hide behaviors using only server-side code. Also, the ModalPopupExtender objects for nested modal windows does not have the OkControlID & CancelControlID set. As the content of nested modal window is only a single user contro

Issue accessing textbox controls nested within a DetailsView within an UpdatePanel

  
I have a couple of textboxes nested with a detailsview, within an updatepanel.  When I try and access them from the code behind, it returns a null value as if they don't exist.  Can't figure out why that would be.ASPX code is: <asp:UpdatePanel ID="upSpecificShout" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true" > <ContentTemplate> <asp:DetailsView ID="dvSingleShout" DataSourceID="sdsSingleShout" runat="server" AutoGenerateRows="false" OnDataBound="SetDVIcons" HeaderStyle-CssClass="noDisplay" > <EmptyDataTemplate> <p class="Watermark"> The panel on the left shows a list of everything you've shouted. (Your replies to other shouts are highlighted in blue/green.) </p> <p class="Watermark"> This right hand panel will show specific shouts with a list of replies etc.. Just do a little click on a shout title to display more detail here. </p> <p class="Watermark">

Textbox in headertemplate gridview lost text in updatepanel

  
Hi everybody,I never post on this forum because since I write code in asp.net I always solve issues by finding solutions with other members who have the problem before me. But this time I don't know how to do...This is my problem : I have a gridview inside an updatepanel and i modified some headers in order to filter the collection. This worked but when my updatepanel is updating, my textbox for the filter clear the value (the text) and lost focus.Is there any solution ?This is my code : <asp:UpdatePanel ID="UpdatePanelOrders" runat="server" UpdateMode="Conditional"> <Triggers> <asp:AsyncPostBackTrigger ControlID="btFilterClear" /> </Triggers> <ContentTemplate> <asp:GridView ID="OrdersView" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" ShowHeaderWhenEmpty="True" EnablePersistedSelection="True" PagerStyle-CssClass="pager" AlternatingRowStyle-CssClass="alter_row" SelectedRowStyle-CssClass="select_row" DataKeyNames="CustId,SalesOrders,CompCode,CustPO"> <Columns>

UpdatePanel postback and resulting ViewState

  
Hi everyone,I'm reading about the UpdatePanel and how it interacts with controls inside & outside of it.  My understanding is that the usual ASP.Net pipeline takes place when posting from within an UpdatePanel-- Page load etc all fire off as normal-- except when the prerendering stage is reached.  In that case the ScriptManager does a final check and only renders those controls within the UpdatePanel and skips the rest.  That's my understanding at least.Sounds good, but for argument's sake let's say I have a TextBox located outside an UpdatePanel.  If a postback occurs from within that panel, the TextBox's properties can still be set in the page load method, but those changes will not take effect. (normally; it is possible to postback the entire page from an UpdatePanel)Is that correct?  What happens to that TextBox's ViewState in this instance?  Is it updated based on what happened to it in the page load method or is that modification tossed out because it wasn't in the UpdatePanel?

Problem with custom onBeginRequest-Handler on client-side when partial postback is triggered from ja

  
Hi, I have a Modal Dialog with a Ribbon, which starts a long running serverside operation. To inform the user about the progress, I implemented Dino Espositos "Progress Monitor Framework", which worked perfectly (after some work) - at least when I trigger the partial postback from a control inside the UpdatePanel used for displaying the progress. In this approach custom onBeginRequest and onEndRequest-Handlers are used to start and stop displaying the current status of the serverside operation. When I start the operation from a Button on the ribbon by doing "something" with the mentioned control via javascript the serverside operation is started, but my onBeginRequestHandler ist not called and the progress monitor is not "switched on" on the client. Here is what I´m doing in my javascript :  function pageLoad() { progressManager = new VCSharePoint.MultiEdit.Progress(); // Remove existing handlers Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(onBeginRequest); Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(onEndRequest); // Register handlers for UpdatePanel client events Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(onBeginRequest); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(onEndRequest); } // onBeginRequest() // Called w

Margin on div removed after async postback with UpdatePanel

  
Hi I have a series of div's inside an update panel, these divs have a margin-bottom defined in css. In IE8, when I do a async postback these margins are all removed. All the other styles are fine. If I turn on compatibility mode this does not happen. In Google Chrome the margins are maintained correctly after the async postbacks. Any idea why this is happening? -- Christian 

Button forces postback in updatepanel inside Popup

  
I have an update panel which is inside a Modal Popup Extender. When I click the Refresh Report button it always calls a postback. I need to stop it from posting back. Ideas?

Can't access dynamicly created textbox in AJAX postback.

  

I have a script which creates a dynamic textbox (and more) in an AJAX async post back. But when I try to acess the textbox I am told "Object reference not set to an  instance of an object". I have been strugleing with this for a long time and can not get it to work so please help me. This is written in C# .Net 4. The line causing the problem is the very last one where I have tbGameName.Text.Trim()

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class GameInformation_AddUpcomingRelease : System.Web.UI.Page
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        string v = this.Request.Params.Get(this.ddlAmountToAdd.UniqueID);

        string[] Regions = { "USA", "Japan", "Europe", "Other" }; //Create a string array of regions.
        string[] Platforms = { "PlayStation 3", "X-Box 360", "Wii", "Computer", "PSP", "Other" }; //Create a string array of platforms

        CreateControlSet(1, Regions, Platforms); //Generate the first Control Set

        if (!string.IsNullOrEmpty(v))
        {
            for (byte i = 2; i <= Convert.ToByte(v); i++)
            {
                //Add a

avoiding postback using updatepanel

  

Hi All:
I have a tabe container enclosed in updatepanel. In one of tabs, I have added a gridview. When I click that tab, and then click a linkbutton "view products" gridview is shown but posback occurs even the whole tab container is enclosed in updatepanel. how to avoid postback on link click ( gridview load)
Regards,

How do you get a textbox/input or a javascript to postback?

  

I am using a Yahoo UI dual slider.  The dual slider changes values based on what you slide.  It uses javascript and sends this value back to a Input type="text" textbox. 


I want to be able to do a automatic postback and call the server function "protected void zoom(object sender, EventArgs e)"  each time the slider value changes.

So what I did was:

<asp:TextBox type="text" id="demo_from"  runat="server"
OnTextChanged="Zoom" AutoPostBack="true">

But the problem is, it WILL not fire the server-side event unless I manually click the textbox and press "ENTER".  Then the event will fire (during debug).


So how can I get the event to auto-fire each time the slider value changes?


thanks!




Problem with "defaultbutton" and IE "TextBox" not writable anymore !

  

Hi guys !

Something strange happens with my application.

In a form when I hit the "Enter" key it launch the DefaultButton, but when I do it twice then the textboxes are focusable but not writeable anymore.

You can see it live with the link and credentials below :

Launch it with IE, then login and insert two tests values by pressing the "Enter" key. Then the bug happens when you want to insert another test value.

http://test.multivalency.com:8004
username : test
password : test


Updatepanel reacting to exteral postback command dispite UpdatePanelUpdateMode being set to Conditio

  

I have a page with about a dozen update panels.  This morning I updated one to work with a Timer and delay the loading of content for speed reasons.  Now this web part wants to updated everytime a postback is submitted on another web part.  I feel I'm missing something simple but can't put my finger on it.  I have included my CreateChildControls() subroutine.  I have made sure the updatepanels had IDs and set  the ChildrenAsTriggers property to true but neither of these seem to help.  The webpart updates by going just going blank.

    public class myClasses : WebPart
    {

        private UpdatePanel _masterPanel;
        private UpdatePanel _upDatePanel;
        private String _errorMessage = "";
        private String _username;
        DropDownList _siteTypeSelection;
        private Timer _loadTimer = new Timer();
        private Image _loadingImage = new Image();

        protected override void CreateChildControls()
     &n

Display popup with partial page postback

  

 I am using an updatepanel and a grid is placed within the same.Now,I have a checkbox corresponding to each row of the grid.If I check it,say corresponding to one row and click a button(placed outside the panel), a popup will be opened which is a separate aspx page having its own functionality.

The requirement is like I need only the panel to refresh not the whole page.

Is this possible?Any help is appreciated.


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend