Showing posts with label panels. Show all posts
Showing posts with label panels. Show all posts

Wednesday, March 28, 2012

Page with update panel doesnt show correct information when I back into the page

I have this page that I'd like to use update panels on. There are three controls on the page. I'd like to have the first dropdown control fire a second dropdown and then that one fire a gridview. I'd like the 2nd dropdown and the gridview to be in update panels. So when a user makes a general category selection in the first dropdown, the 2nd one will list the more specific categories (those related to the first dropdown selection) and then when the user picks a more specific category the gridview is filled with with data specific to that 2nd more specific category. I've got this all working fine. The the user clicks the "details" link in the gridview and they see full details about their selection from the gridview. But then when they click the "back" button in their browser, it takes them back to the page with the 2 dropdowns and the gridview but it's not in the state they left it. Ideally, they should see the same thing they saw before they clicked the "details" link.... their first selection int he first dropdown, their more specific category in the 2nd dropdown and the gridview filled with info relating to that 2nd dropdown. But that's not what I get. What am I missing?

hello.

well, you're not missing anything. it's simply the way ajax pages work. i think that you should take a look at the history control available on the future bits

http://msmvps.com/blogs/luisabreu/archive/2007/05/07/may-future-bits-the-history-control.aspx

Monday, March 26, 2012

PageMethods vs UpdatePanel

Hi,

I am a big fan of using 'Update Panels'. Not because of the only simplicity but also bcoz of my belief on the AJAX framework.

Also Scott G has kept on introdcueicng lots of new features in UpdatePanel in Orcas/S 2008


But,still lots of architects do say that, PageMethods[http://metasapiens.com/PageMethods/Tutorial/VS2005/] are moreefficient than Update Panels.
Here is the link - ASP.NET AJAX UpdatePanels are dangerous.

http://encosia.com/2007/07/11/why-aspnet-ajax-updatepanels-are-dangerous/

Afterreading the page, I am quite suspicious on Update Panel and now thinkthat really PageMethods saves perfomance overhead.But at the same time,simply by going thru few pages, accepting the same seems to be quiteimpractical.

Please let me know, is really PageMethods are moreefficient than UpdatePanel. If yes, then please list me the things thatcannot be done using PageMethods, which can be done by UpdatePanel.

Regards,

Arun

take a look at the video byJoe Stagner

How Do I: Choose Between Methods of AJAX Page Updates?

http://www.asp.net/learn/ajax-videos/video-160.aspx

It will show you the big diference...

And the response by the WebMethod, give you the freedom to manipulate and interact with the HTML elements (UI) way you want ..

PageRequestManagerParserErrorException with the New ASP.Net Ajax framework

I have two simple web pages with two update panels in them. The first one calls the second one using Server.Tranfer or Server.Execute and it gives the following error message:

Sys.WebForms.PageRequestmanagerParsererrorException: The Message received from the Server could not be Parsed. Common caused for this error are when the response is modified by calls to response.Write(), response filters, HttpModules, or server trace is enabled.

Now, this never happened with the previous framework, atlas. I've tried all possible solutions I could think of, but none worked so far.

Try to take a look at the following forums for?reference.
http://forums.asp.net/thread/1467462.aspx
Wish this can help you.

Saturday, March 24, 2012

panel collapse expand problem

i have several panels one below other which can be expanded and collapsed. suddenly the panels have stopped sliding down if a collapsed panel above them is expanded, although the panel expands (but hidden behind the panels below it). wht cud have happened? (i have not absolutely positioned the panels)

also, can somebody point me to a link tht explains 'display' property in CSS, with it's different options (inline, inline-table, block etc.) through examples?

Have you set the display property to none on the panel? The Toolkitsample website demo pages use a set of CollapsiblePanels stacked and you scenario should be able to do the same.

Here is alink to the msdn documentation on the css style display property.

Panel is resizing when it is used with RoundCornerExtender.It looks page load twice

hi

I have a master page , in that i have placed three panels and foreach panel i have a RoundedCornersExtender for round corners.problem iswhen i run the page it loads two times. I think that is because of roundcornerextender,when the page loads the panel looks to be resizing and it causes the page loads twice

when i remove the RoundedCornersExtender from the panel,it worksfine and load only once.but i want round corner panel for my masterpage to look good.


if anybody having the solution for this,plz advice me.Thanks in advance

This is my master page code

<%@dotnet.itags.org. Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<%@dotnet.itags.org. Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link href="http://links.10026.com/?link=Hq_StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#4B5C82"><%--"#4B5C82"--%>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<table cellspacing="5" cellpadding="4" width="95%" align="center" id="mastertable">
<tr>
<td colspan="2">
<asp:Panel ID="panel1" runat="server" Width="100%" BackColor="#ffffff" >
<!--#include file="header.aspx"-->
</asp:Panel>

</td>
</tr>
<tr >
<td width="20%" height="100%" valign="top" >
<asp:Panel ID="panel2" runat="server" Width="100%" BackColor="#ffffff" Height="100%">
<table cellpadding="3"><tr><td>
<!--#include file="leftnav.aspx"-->
</td></tr>
</table>
</asp:Panel>
</td>
<td width="80%">
<asp:Panel ID="panel3" runat="server" Width="100%" BackColor="#ffffff" Height="100%">
<table cellpadding="3"><tr><td>
<asp:contentplaceholder id="middleContent" runat="Server"></asp:contentplaceholder>
//Content pages
</td></tr>
</table>
</asp:Panel>
</td>

</tr>
<tr>
<td></td>
<td id ="footer">
<!--#include file="footer.aspx"-->
</td>
</tr>
</table>
<ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender1"runat="server" TargetControlID="Panel1" Radius="8"BorderColor="#ffffff">
</ajaxToolkit:RoundedCornersExtender>
<ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender2"runat="server" TargetControlID="Panel2" Radius="8"BorderColor="#ffffff">
</ajaxToolkit:RoundedCornersExtender>
<ajaxToolkit:RoundedCornersExtender ID="RoundedCornersExtender3"runat="server" TargetControlID="Panel3" Radius="8"BorderColor="#ffffff">
</ajaxToolkit:RoundedCornersExtender>
</form>
</body>
</html>

Regards

Ajith

Hi Ajith,

My suggestion is you can wrap all contents in an div, and set this div's display property to "none" initially.

Then, add a pageLoad function to show it on client side. Like this:

function pageLoad()
{
$get("div's id").style.display = "block";
}

Hope this helps.


Hi Wen

Thank you Very much. it is working superb, but sometime when page loads, twice loading happens again(some times only).what would be the problem?

plz advice.Thank you very much once again

Regards

Ajith


It's hard to tell because I'm not able to reproduce that.

Can you make sure which element incurs a second postback?


Hi Wen

in my header page , i have menu for each page.for eg consider first menu
having a link to 1st page, in that page i having several textboxes and 1 dropdownlist
and cascadingdropdown and 1 auto complete extender.in that menu i clicked several times
only one time the page load twice.i think it may coz of processing time.

2nd having link to another page, in that page also i am having the same controls mentioned above and aditionally i am having ultrawebgrid(thirdpartycontrol,infragistics).i click
this menu also several time , in this case the pages seems like loading
twice so many times. idont know which control is making the problem.


This is the situation i am having.

Plz advice.

Regards

Ajith

Panels and external pages

I have an ajax panel with a grid on it. When clicking on the grid a new window is opened with information from the grid. When finished i want to update the grid when the popup window is closed, how do i do it?

chaim

when opening the new window in your javascript, add the new window to a variable.

var nWindow = window.open("page")

the write a javascript timer to check whether the nWindow is null or not. If it is null then raise a postback to update the grid.

-Alan

Wednesday, March 21, 2012

Partial Page Updates

I have a page that originally had just one update panel that held everything inside of a few collapable panels on a 15 seconds timer trigger. The collapsable panels where sluggish in performance so I changed code where there were multiple update panels on the same 15 second timer trigger inside of the update panel that is not on a 15 second timer trigger. The problem is that I placed a label that wrote the current time to see if the outside panel was updating and it's still acting like it's on a timer like the ones inside the collapsable panels...but it's not on a timer anymore, just the inner update panels are. I've setEnablePartialRenderingto "true" in the script manager. What's my problem?

Here's my suedo-layout to give you a basic idea:

<timer1>
<updatepanel>
<content>
<label for current time>
<collapseablepanel extender>
<collapseablepanel1>
<updatepanel1>
<content></content>
<trigger=timer1></trigger>
</updatepanel1>
</collapsablepanel1>
<collapseablepanel2>
<updatepanel2>
<content></content>
<trigger=timer1></trigger>
</updatepanel2>
</collapsablepanel2>
<collapseablepanel3>
<updatepanel3>
<content></content>
<trigger=timer1></trigger>
</updatepanel3>
</collapsablepanel3>
</collapsablepanel extender>
</content>
</updatepanel>

Two things,

Firstly label control's update panel should be closed and rest should be seperate.

secondly try using literal control


Set the Timer as a trigger for the outer UpdatePanel.


I just want all of the inner update panels to update on the timer. The outer one is just for the collapsable panel extender, but it still updates with the rest of the inner ones for some reason. That's my problem; I just want the inner ones to update on the timer, but the outer one is updating even though it doesn't have a timer associated with it.


Set ChildrenAsTriggers to false on the outer one then. It's true by default.

Thank you! That worked...also, if I have 4 update panels set to the same trigger will it be like my page is loading 4 times? Should I do something different there?


The multiple panels shouldn't have a significant impact on performance either way. You can be sure by watching your page operate in Fiddler or FireBug, but it should just trigger a single partial postback per Tick that updates all four panels with its response.