second update panel's hidden field data loses when first update panel's procedure clicked

I am using asp.net v2.0 - my ajax enable web site have 2 update panels

1st Update panel updates a hidden field placed in the 2nd update panel - ok hiden fild is get updated

edit procedure associated with in the first update panel then again try to read the value from the hidden field (it is database editing procedure, the hidden filed contain the Primary key).

but when the edit procedure is clicked, hidden filed looses the data, the following event is get called when edit_procedure() is clicked 

Protected Sub hfTenantId_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs)

txtTenantName.Text = hfTenantId.value

End Sub

 

any idea to solve this problem

0
sheriefes
9/17/2008 10:55:20 AM
asp.net.ajax-discussion 13973 articles. 1 followers. Follow

4 Replies
1570 Views

Similar Articles

[PageSpeed] 3

 I think you'll have to set update mode of your hiddenfield update panel to conditional and run updatepanel2.update() to update the hidden fields value, or hold it in the first update panel therefore auto updating after click anyway?

 

Regards

Liam


If you've had a problem then someone else has too. Google is your friend. google for your topic title.
0
Shocker
9/17/2008 11:30:42 AM

here goes the 2nd update panel - I cannot place the hidden filed in first panel, since it is used by many other procedures also, which not associated with first panle alone.

HOW TO CALL updatepanle.update() event 

<
asp:UpdatePanel ID=UpdatePanel3 runat=server UpdateMode=Conditional ChildrenAsTriggers=false ><ContentTemplate>

<Triggers><asp:AsyncPostBackTrigger ControlID="lnkTenantCode" EventName="Click"/></Triggers>

<Triggers><asp:AsyncPostBackTrigger ControlID="lnkTenantType" EventName="Click"/></Triggers>

<Triggers><asp:AsyncPostBackTrigger ControlID="lnkTenantName" EventName="Click"/></Triggers>

<asp:HiddenField ID="hfTenantId" Value="0" runat=server OnValueChanged="hfTenantId_ValueChanged" />

<asp:HiddenField ID="hfSearchTenantSender" Value="" runat=server/>

<asp:HiddenField ID="hfSearchTenantParam" Value="" runat=server/>

<asp:HiddenField ID="hfTenantTypeId" Value="0" runat=server/>

<asp:HiddenField ID="hfCountryId" Value="0" runat=server/>

<asp:HiddenField ID="hfTenantStatus" Value="" runat=server/>

<asp:HiddenField ID="hfExpiredFor" Value="" runat=server/>

<asp:HiddenField ID="hfSql" Value="" runat=server/>

</ContentTemplate></asp:UpdatePanel>

0
sheriefes
9/18/2008 3:40:39 AM

OK OK, THANKS

I started calling updatepanel3.update() in every procedures that update hiddenfiled - it worked

thanks once again

 

updatepanel3 - refers to my second updatepanel

0
sheriefes
9/18/2008 4:09:25 AM

 That's great,

 

Nice and confusing naming though :)

My naming method for AJAX sites is for every control within an updatepanel to be prefixed with the update panel name. It helps a tonne!

 Remember to mark posts as answer so the topic is completed.

Regards

Liam


If you've had a problem then someone else has too. Google is your friend. google for your topic title.
0
Shocker
9/18/2008 5:16:26 AM
Reply:

Similar Artilces:

Multiple panel updates; One panel's postback initiates another panel's update.
Sorry to have to be such a nag in this forum, but you members rock! For my next question.. I have 2 updatepanels on my masterpage. One panel I fill with a table of products I have for sale and each product has a 'Add to cart' button. In the event for 'AddToCart_Click' I will add thier product to a DB table for the cart. Now, is it possible to, from within the the AddToCart_Click event tell the cart UpdatePanel to 'update' Then when the cart panel updates I will have a Page_load that checks the DB to see if the use has any products, and if so list them.. Any suggestions/solutio...

First gridview's selected row doesn't update second gridview's objectdatasource
 HelloI got 2 gridviews on a page, each with its own ObjectDataSource. The first gridview fills itself just normally, no problem there. The second gridview needs to fill itself with other data, where the primary key is the primary key of the selected row of the first gridview.schematically:gridview1 row: IDfield, x, y, zrow: IDfield, x, y, z (-> this row is selected)row: IDfield, x, y, z gridview2 row:IDfield_of_selected_row_in_gridview1, a, b, c I tried to do this by configuring the ObjectDataSource behind gridview2 with a parameter pointing to gridview1.selectedValue. (by usin...

Shouldn't a "sub" panel be hidden if it's in a panel that isn't visible?
I have two panels on a page.  Panel A, and then within Panel A is Panel B.  If Panel A's visibility is False, shouldn't Panel B's visibility automatically be false because it's within Panel A?  Never make important decisions on a Monday! If you mean its property, then no it will be whatever you set it to.If you mean whether or not it is rendered to html, then if it's parent isn't rendered, then it isn't rendered.You can set the visibilty of nested panels independently of their parents, what if you have two nested and you want to hide one and not t...

Odd problem !! From 'Update function' I can write 'Update function ' but just call one char.What's wrong??
Odd problem !! From 'Update function' I can write 'Update function ' but just call one char. I can succee to update using stored procedure but I don't know why only one char can update this record in database. e.g AccessGroupCode = "1" I can update in SQL SERVER AccesSGroupCode ="faa" I can't update in SQL SERVER What's wrong?? The following code is my stored procedure and VB code . thx a lot . ------------------------------------------------------------------------------- Create procedure update_BMSAccessGroup_1 ( @Acces...

BLOB fields to replicate (EXE's,Dll's) Like live update
Is it possible to store program executables and Dll's in BLOB fields to replicate program updates through the database? Sort of like a live update feature. I would have an application that would read the database field and update the apprpriate program files (If possible) I am using version 8.0.2 build 4029. Thanks TPS You can put anything you want in a LONG BINARY or LONG VARCHAR column. Breck On Sun, 13 Jul 2003 19:10:52 -0600, "TPS" <ts@scientexlc.com> wrote: >Is it possible to store program executables and Dll's in BLOB fields to >repli...

The quick updater/partial updater (whatever it's called) has never worked for me, it's always told me it failed.
Name: Lucas Email: hgmme08atgmaildotcom Product: Firefox Summary: The quick updater/partial updater (whatever it's called) has never worked for me, it's always told me it failed. Comments: I'm running a macBook Pro (late 2007 edition) with Mac OS X Leopard and every time there is an update and it tries to download the small update package it fails and has to download the bigger one. I don't if there are any other details I can start forwarding to ya'll so that it can hopefully be remedied in future updates, but if there is let me know. Browser Details: M...

Ajax Update Panel issue with browser's refresh
Hi,   I have some  x no.of check boxes and one button and one gridview.These all are in a update panel.When i select checkboxes and click on button i will bind the gridview and show up.This is all fine.But when i click the browser's refresh button,after that i select checkboxes and click on button.But this time grid is not showing up.I have debugged the c# code.Everything is working fine. The binding code for gridview is also running. But it is not showing the grid. Can anybody help me..............?    Hi nareshpalvai,We can not find the clue...

Update Panel's Trigger Collection can't find control
I need to put a trigger of a button (btn1) that is inside of a accordion (accordion1) to update my updatepanel. A control with ID 'btn1' could not be found for the trigger in UpdatePanel 'UpdatePanel1'. I've already tried 'accordion1$btn1' can anybody help me?[]shttp://www.fabiocolombini.com Are you trying to access it via Javascript? If so you can use <%= btn1.ClientID %> to get the full client side ID of the control.--Rob WallingASP.NET MVPMy blog, Software by RobPlease click "Mark as Answer" if my post helped you. I have a update pa...

I'm P*SSed
Hello, I am really pissed. Firefox updated it's self Even though I KNOW I have Always had the auto update setting turned off. I just restarted my PC to clear cache ect. and when I restarted and started Firefox it notified me that it had been updated.. All my Bookmarks are GONE! there is a 2.21 MB "backup" Bookmarks file but it is Empty! I've even looked at it in my editor, HTML-kit and Notepad... It's Empty... All my settings are gone and I can not show the bookmarks bar. What the F* is up with this crap. I'm about to remove and stop recommend...

Find the URL of the calling page when ajax's update panel is used
hi,I am trying to find the URL of the calling page when both the calling and the caller pages use Ajax's update panel.I have used Requst.UrlReferrer for this but it returns empty string. I have written this piece of code in page load event of Page1 which will be called by Page2 or Page3.string url = Convert.ToString(Request.UrlReferrer);if ((url.Contains("Page2.aspx")) || (url.Contains("Page3.aspx"))) {//Perform some operation } I have update panels on Page1 and Page2.When Page3 calls Page1 it works fine.But when Page2 calls Page1 it will not work.Please hel...

Modal Popup + Update Panel + Postback = Lose Fileupload's viewstate
Hi,  Well the subject pretty much sums up my problem. I'm using a Modal Popup Extender and inside the panel that serves as the modal popup I have an Update Panel that covers the whole area, now, i have a checkbox that upon clicking changes the properties of other controls inside the update panel. It's all good except for one thing, when a postback is made, the fileupload control loses the value it had prior to the postback...  Any thoughts on how could i solve this problem?Emmanuel MedinaSoftware Developer"Failure is the opportunity to begin again more intelligently...

The value's length for key 'data source' exceeds it's limit of '128'.
Hii, When I tried to bind dropdownlist to database by declaring connection string in the code behind file I am getting this error: The value's length for key 'data source' exceeds it's limit of '128'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: The value's length for key 'data source' exceeds it's limit of '128'.Source Error: An...

I'm trying to update a GridView by using an Update Panel. Can't get the update to work.
Even when the GridView first loads, none of the new rows that I have added to the database will show up. Any help is appreciated. Thanks.  Code:<asp:ScriptManager ID="ScriptManager1" runat="server" />        <asp:UpdatePanel runat="server" id="UpdatePanel" updatemode="Conditional">        <Triggers>            <asp:AsyncPostBackTrigger controlid="btnRefresh" eventname="Click"...

Find the URL of the calling page when both the calling and the caller pages use Ajax's update panel
hi, I am trying to find the URL of the calling page when both the calling and the caller pages use Ajax's update panel. I have used Requst.UrlReferrer for this but it returns empty string.  I have written this piece of code in page load event of Page1 which will be called by Page2 or Page3.string url = Convert.ToString(Request.UrlReferrer);if ((url.Contains("Page2.aspx")) || (url.Contains("Page3.aspx"))) { //Perform some operation }  I have update panels on Page1 and Page2. When Page3 calls Page1 it works fine.But when Page2 calls Page1 it will not...

Web resources about - second update panel's hidden field data loses when first update panel's procedure clicked - asp.net.ajax-discussion

Resources last updated: 1/2/2016 10:58:08 AM