Showing posts with label contains. Show all posts
Showing posts with label contains. Show all posts

Wednesday, March 28, 2012

UpdateProgress stops working

Hello everybody,

my problem: I have a gridview in an update panel, and the gridviews header contains some DropDownLists for filtering data. Also the Gridview is enabled for Sorting

and Paging. All works fine. But to inform the user that the action he started is on the way, i included a UpdateProgress with a gif animation. So when the user starts filtering

or sorting the gif animation is shown and animated. But after a short time, it stands still. A second or two later, the GridView is bound completely and the gif disappears.

So something seems to block the UpdateProgress. What am i doing wrong ? the gif animation is on top of the gridview.

any hint is aprreciated, thanks a lot !

This happens when the browser is rendering the response... Haven't found really anything to do about it :(

-Damien

UpdateProgress Renders Differently in IE7

I am using an update progress control which contains an animated gif and then some text below. The style on the DIV creates a box around it. It renders fine in IE6 but IE7 the Please Wait...shows up outside the box...any suggestions? Here is the code and css style:

<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<Div class="wdeProgressIndicator">
<img src="http://pics.10026.com/?src=images/progressbar.gif" alt="Please Wait..." />
Please Wait...
</Div>
</ProgressTemplate>
</asp:UpdateProgress>

background-color: #ffffff;
margin: auto;
height: 10px;
width: 300px;
position: absolute;
left: 50%;
top: 40%;
margin-left: -150px;
margin-top: -5px;
border-right: #5d7b9d thin solid;
border-top: #5d7b9d thin solid;
border-left: #5d7b9d thin solid;
border-bottom: #5d7b9d thin solid;
padding-right: 5px;
padding-left: 5px;
padding-bottom: 5px;
padding-top: 10px;

If i do the following it works fine, so there has to be more html in the page, that is manipulating something. In any case, why not make the image a background-image on the div with the css, and rmeove the image tag all together, so the image is just part of the div anyway.

<html>
<style>
.wdeProgressIndicator{
background-color: #ffffff;
margin: auto;
height: 10px;
width: 300px;
position: absolute;
left: 50%;
top: 40%;
margin-left: -150px;
margin-top: -5px;
border-right: #5d7b9d thin solid;
border-top: #5d7b9d thin solid;
border-left: #5d7b9d thin solid;
border-bottom: #5d7b9d thin solid;
padding-right: 5px;
padding-left: 5px;
padding-bottom: 5px;
padding-top: 10px;
}
</style>

<body>
<Div class="wdeProgressIndicator">
<img src="http://pics.10026.com/?src=images/progressbar.gif" alt="Please Wait..." />
Please Wait...
</Div>
</body>
</html>


Good suggestion..thanks. That seems to work for now.

Monday, March 26, 2012

Updating control in UserControl inside of UpdatePanel

Hello,

I have a page that contains a UserControl. Most of the page (including the UserControl) is wrapped in an UpdatePanel. When an AJAX event on the page occurs, I'd like to call a method inside of the UserControl to update a label. Problem is, when I do this, the page adds a new copy of the UserControl's contents (with the updated label) at the bottom of the page rather than refreshing the existing copy. Any idea what I'm doing wrong?

Thanks.

Are you dynamically creating the controls in the user control or dynamically creating the usercontrol itself? Posting your source code would be helpful.


Nope, no dynamic loading of anything. The page just looks something like this:

<asp:ScriptManagerrunat="server"ID="ScriptManager1"></asp:ScriptManager>

<asp:UpdatePanelID="UpdatePanel1"runat="server">

<ContentTemplate>

<Custom:HotelDetailsrunat="server"ID="HotelDetails1"/>

</ContentTemplate>

</asp:UpdatePanel>

And there's an event in the code-behind of the page:

ProtectedSub DateChanged(ByVal srcAsObject,ByVal eAs Infragistics.WebUI.WebSchedule.WebDateChooser.WebDateChooserEventArgs)

HotelDetails1.UpdateRooms(wdcCheckIn.Value, wdcCheckOut.Value)

EndSub

And in the UserControl, there's a public method like this:

PublicSub UpdateRooms(ByVal StartDateAs DateTime,ByVal EndDateAs DateTime)

litName.Text = StartDate.ToShortDateString()

EndSub


I split the page into two UpdatePanels...one for the even firing controls and one for the UserControls that get updated and that seems to resolve the issue.

Updating UpdatePanel contents from Popup

Welcome, can you help me solving that problem

I have a UserControl UserControl1 that contains Gridview gridview1 and input Button button1, An UpdatePanel contains UserControl1 in a page, when i press that button1 it opens a popup window which contains a input button popUpButton and a TextField, the pop up is used to add a new record to the datasource of gridview1, Then i rebind the updated datasource to gridview1, Hover the problem is the gridview1 don't render the new row added although it's datasource is updated ..!
Notes:

- I tried to use both modes of UpdatePanel (Always and Condtional) but no hope
- The UpdatePanel is in the page NOT in Usercontrol1
- There is one ScriptManager and two other update panels in same page
- I use .NET Callback interface methods When I press popUpButton IN THE popup control so that i can trigger serverside update datasource process from client side javascrip code

so how i can render that changes from datasource to gridview??

Hi

This link helps youRefresh GridView in Parent Page.

Regards.

Wednesday, March 21, 2012

UrlRewriting, CascadingDropDown and "*" verb

Hi,

I use urlrewriting. In IIS settings contains "*" verb.
When I use CascadingDropDown there is an error of "Method error 405".
When I delete "*" verb - all is OK.

How to decide a problem without the delete of "*"?

Your URL rewriter is probably interfering with ASP.NET AJAX's handler for web service traffic.

Hello,

thank you for reply.

For rapid solution with MS ASP.NET AJAX I use jointly Anthem.NET AJAX. DropDownList control in Anthem.NET AJAX is working without web service (data is loading directly from DataSet). These two libraries is working jointly without conflicts.


I had the same problem I have resolved it. It is a problem/bug with IIS 5, look here:http://forums.asp.net/t/1123124.aspx

You may also add form extender as described here:http://forums.asp.net/t/1129701.aspx.

This is the code you need:

Ok, I have fixed it. It requires this code. Seems like this is a bug in IIS 5...It is not stripping PathInfo correctly before handling request to ASP.NET

privatevoid OnBeginRequest(object sender,EventArgs e)

{

HttpApplication app = senderasHttpApplication;

HttpContext context = app.Context;

string path = context.Request.Path;

int aspx = path.IndexOf(".aspx/",StringComparison.OrdinalIgnoreCase);if (aspx >= 0)

{

context.RewritePath(

path.Substring(0, aspx + 5),

path.Substring(aspx + 5),

context.Request.QueryString.ToString());

return;

}

int asmx = path.IndexOf(".asmx/",StringComparison.OrdinalIgnoreCase);if (asmx >= 0)

context.RewritePath(

path.Substring(0, asmx + 5),

path.Substring(asmx + 5),

context.Request.QueryString.ToString());

}

}