Showing posts with label everybody. Show all posts
Showing posts with label everybody. Show all posts

Monday, March 26, 2012

Ajax Toolkit Page Vs Iframe problem

Hi Everybody,

I have created an aspx page that uses Ajax tools for validation and filtrations . I finished the page deploy it and test it and every thing is perfect. The problem Arise when integrate the page into Iframe in another website. It gives a javascript error in the browser when you first interact with any control that uses AjaxToolkit and here are its details

Sys.ArgumentOutOfRangeException: Value must be an integer.

Parameter Name: x

Actual Value was NaN

The thing that makes things strange that if access the page Url that iframe is pointing at the page will work fine.

By the way both websites are in the same machine

Thank You

T tried to do another way to discover the source of the problem. So I create a test page at the same project. The page contains an identical copy of the original page and an iframe that points the original page. The result that I got is that every thing outside the iframe is working fine but in the iframe it is giving the same previous error.

Please Help


Dear All

At the end I figured out the problem is caused by one of the Iframe properties called frameborder when this property is set to yes or no the frame border is working fine but the script is not working properly but when I changed it to 0 or 1 the problem disappeared and every thing is fine. by the way the border property was added by the dotnetnuke iframe editior.

Thank you


Thank you for this response. I wasted hours trying to figure out if it was the script combiner or my web config settings when the issue was the iFrame all along. Thanks again!

Saturday, March 24, 2012

Ajax Timer & Validators

Hello Everybody,

I have this problem: One page with lots of ASP.NET validation controls and tried to add one AJAX timer that must tick every 20 seconds. My update panel is really simple now, just the timer and a label to show the timer... the problem is that the timer just tick once. I know is due to validation controls 'cause I create a simple test page with just one textbox and a range validator and of course my timer, and after the first tick, it doesn't tick again. I already add this code in the Web.Config for Validators:

<tagMapping>

<addtagType="System.Web.UI.WebControls.CompareValidator"mappedTagType="Sample.Web.UI.Compatibility.CompareValidator, Validators, Version=1.0.0.0"/>

<addtagType="System.Web.UI.WebControls.CustomValidator"mappedTagType="Sample.Web.UI.Compatibility.CustomValidator, Validators, Version=1.0.0.0"/>

<addtagType="System.Web.UI.WebControls.RangeValidator"mappedTagType="Sample.Web.UI.Compatibility.RangeValidator, Validators, Version=1.0.0.0"/>

<addtagType="System.Web.UI.WebControls.RegularExpressionValidator"mappedTagType="Sample.Web.UI.Compatibility.RegularExpressionValidator, Validators, Version=1.0.0.0"/>

<addtagType="System.Web.UI.WebControls.RequiredFieldValidator"mappedTagType="Sample.Web.UI.Compatibility.RequiredFieldValidator, Validators, Version=1.0.0.0"/>

<addtagType="System.Web.UI.WebControls.ValidationSummary"mappedTagType="Sample.Web.UI.Compatibility.ValidationSummary, Validators, Version=1.0.0.0"/>

</tagMapping>

and I added too the Validators.dll... So anyone has an idea of what is missing?

Thanks,

Alejandra

Ok, I solved this problem. I just had to add an "EnableClientValidation = false" to every single validator and it worked, now the timer ticks every 20 seconds... the problem is that I still need to do a couple of Client Validations... hmmm.. I think I would need to do a workaround for this. Any suggestions?

Thanks