ラベル application の投稿を表示しています。 すべての投稿を表示
ラベル application の投稿を表示しています。 すべての投稿を表示

2012年3月26日月曜日

Response.Redirect in AJAX

I have a button in Update panel.

On button click I have written

Response.Redirect("InterMediateMsg.aspx", False)

When I executes the application I got the Error..

Sys.WebForms.PageRequestParserErrorException:The message received from the server could not be parsed.

How should I implement Redirection in AJAX.

Hi,

in the onclick (client side!!) you just place self.location.href='urltogoto'. Don't use AJAX for something like that but plain old javascript.

Grz, Kris.


Response.Redirect should work fine during an async postback. Try dropping the "False"... I'm not sure if you can use that option.


Actually I have performed server side coding( Database operations) on button click .

After the successful operation I want to navigate to another page.

How could I do it.


I have tried it by dropping false.

Actually this second parameter specifies whether I want to terminate execution of current page or not.

Is there any effect of browser.

I am using IE 6.0


Make sure that you have buffer set to false on the page from which you wish to redirect - otherwise output will already have been streamed out to the client, and things will go horribly wrong!

This cost me quite a bit of investigation a while ago..!


i think this error may be because it is trying to process a redirect within the update panel. assuming you use a trigger for the updatepanel and button, set it to a asp:PostBackTrigger instead of a asp:AsyncPostBackTrigger, this will send your page into a full postback, which may solve your problem (i haven't tested it).


I try the way you suggest, and its work !Wink


glad to help!Smile


Thnx ChrisCicc ,

It's working.

I have set the Trigger for button to PostBack and it worked.

2012年3月24日土曜日

rjs Popcalendar in UpdatePanel

I've got a web page that allows users to enter X number of people for an application. I have an asp:Table contained in an UpdatePanel. The trigger for the UpdatePanel is a dropdown list that is used to select the number of people the user wishes to enter (1-14). On the initial page load only the 1st row in the asp:Table is visible and when the user selects how many people to enter I use an AJAX call to hide/show the appropriate asp:Table rows. Each row in the asp:Table contains a rjs:Popcalendar to select the date of birth. All the Popcalendar controls work fine if all the rows are set to Visible="true" on the initial page load. However, any row that has Visible="false" on the initial page load and is set to visible via the AJAX call gives the following error when the Popcalendar is clicked: Error: 'calResidentDOBX' is undefined

It appears that the page is only aware of the Popcalendar controls in the rows that are initially visible when the page loads. How can I make the page aware of the Popcalendar controls for the rows being set to Visible="true" in the AJAX call?

Thanks

Hi,

It's a javascript object undefined error,I think the simplest way to fix it is:

checking if there is a html control with it's ID set to "calResidentDOBX",

if there is no such control,the ASPX doesn't produce the right HTML,so check your logic in the behind-code.

if there is a such control,Try this:document.getElementById("calResidentDOBX")

debuging the javascript functions to see why the object is undefined.

Thanks


Hi,

I think the cause is:

When you set some controls's Visible="false" on the initial page load,ASPX doesn't generate HTML code for these controls. ASPX just generate HTML code for them when their Visible been set to "true" in Asynpostbacks.

But these controls cann't be accessed in javascript just use their IDs,you must use document.getElementById("ID") to access them.

Thanks


Download the new version from this urlhttp://es.geocities.com/ricaj0625

Use the libraryRJS.Web.WebControl.PopCalendar.Ajax.Net.dlland the javascripts in the directoryPopCalendar2005AjaxNet.

This version support ASP.NET AJAX from Microsoft

Saludos,

Ricaute


I'm not able to get the RJS popup calendar to work.

Not sure I know how to do the following steps properly:

Is it possible to break these steps down further? Thanks

5. Add RJS.Web.WebControl.PopCalendar.dll to the project Reference

6. Add RJS.Web.WebControl.PopCalendar.dll to the toolbar


Thanks. The popup calendar is working.

RJS Calendar in GridView with Atlas

Hi all,

I am using Atlas in my web application. In edit template of grid view, I am using RJS Calendar (a third party). Every thing works normal while viewing the page without Atlas. When atlas is implemented on that page, calendar still works fine for Firefox but not for IE 7.0. It returns javascript error and calendar control wont open. As soon as Atlas is removed, it starts working again. For last two days, I am unable to resolve this problem. If any one have any idea/solution, please let me know.

Thanks in advance.
Best Regards.

I am having exactly the same problem. It works great in Firefox, but reports an error in IE, which says,

Char: 1
Error: 'document.getElementById(...)' is null or not an object.
Code: 0

I am using MagicAjax.

Any workaround for IE7.0?

2012年3月21日水曜日

RoundedCornerExtender display delay

Hello,

i am using several RoundedCornerExtenders in an application.

When the page is displayed i notice a delay of about half a second (guessed, not measured) to display the rounded corners. That means when the page is loaded i first see the panel that has been extended and then after the short delay the rounded corners are added.

The property "Radius" is set to 10 and i have set a backgruond color so i get a nice colored bar with round corners at the top and the botton of my panels.

Can anyone give me a hint how this display delay can be removed?

Thanks in advance,

Ralf

You might consider changing the LoadScriptsBeforeUI setting, but be sure you consider the side effects as well:http://ajax.asp.net/docs/mref/P_System_Web_UI_ScriptManager_LoadScriptsBeforeUI.aspx