Showing posts with label created. Show all posts
Showing posts with label created. 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!

AJAX toolkit "access denied" problem

I am redesigning a site to include AJAX. On a new page that I created that contains a Tab Control, when I copy the page to the site's server, why would I be getting an "access denied" problem for a page that allows anonymous users? When I remove all references and controls for AJAX, it works fine.

Thanks for the information

Some more information on this problem...it seems as if it may be an IIS permission problem. All the AJAX controls run fine on the development machine, but in examining the website even further, any page with interaction, like a textbox with a watermark, I am getting Access Denied errors. Any help on this problem would be appreciated.

AJAX Toolkit - VB Toolbox Problem

Hi,

I am trying to add items to my newly created AJAX Toolbox, with "Choose Item" and no matter what i do i keep getting this error:

There was an error loading types from assembly "[location of AjaxControlToolkit.dll]" 'Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed'.

Any suggestions will be highly appreciated.

Thank you.

I ment to say VS Toolbox problem (as in Visual Studio).Embarrassed

hi there,

i had teh same problem . try building the ajax control toolkit solution and try adding the built dll. it worked for me.


Pretty please. Help needed!

I cannot use any controls from the Ajax Toolkit. Among other things, this is the error I get when i try to use such a control:

The type 'System.Web.UI.ExtenderControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

As far as I know, I used the correct settings in my web.config.

Any ideas will be highly appreciated.


I had the same issue. What I did was add the Toolkit application to the application configuration in the .NET configuration tool. Then I installed the extenders by using AJAXControlExtender.vsi.

That worked for me...


Make sure your web.config includes the following line:

<compilationdefaultLanguage="c#"debug="true">

<assemblies>

<addassembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>


If you put System.Web.Extensions.Design.dll and System.Web.Extensions.dll in your bin folder, i think you will see them..

Saturday, March 24, 2012

Ajax Textbox Issue

Hi,

I have created a ASp .NET 2.0 Ajax enabled Website. I have two textbox controls on the default page. These controls are added to the UpdatePanel. What I want is, when the first textbox looses focus and moves to textbox2 the datetime should automatically get added to the first textbox.

All I find is the serverchange event of the first textbox. An article on web should that it can be done through onblur but since the textbox control is a server side control, I think onblur will not work.

Please help!!

Thank You,

~B.

You can add onblur in the code behind file if you do something like TextBox1.Attributes.Add("onblur","dothis();");


onblur, onfocus, etc. will work with the server controls. You can also add them right in source view, though the Visual Studio IDE may tell you that they are not supported attributes.


You can use onblur or lostfocus event

TextBox.Attributes.Add("onblur","functionName()");

TextBox.Attributes.Add("lostfocus","functionName()");

Wednesday, March 21, 2012

AJAX Tab Left Side Image Wont Show

For some reason I can't get the image I created for the left side of both my normal and active tabs to show. The right side image shows just fine. The left side images give a nice round corner on the upper left corner and a border on the left end. As you can see in the screen clipping below the left side of each tab is just cut off. Does anybody have any ideas? Thanks in advance...

Here is my custom CSS styled tab strip:

Missing Ends

Here is the CSS:

.ajax_tab_top.ajax__tab_header

{

font-family:verdana;

font-size:10px;

font-weight:bold;

padding-left:5px;

height:18px;

vertical-align:middle;

}

.ajax_tab_top.ajax__tab_outer

{

background-position-x:left;

background-image:url(Images/TabLeft.jpg);

background-repeat:no-repeat;

margin-left:1px;

}

.ajax_tab_top.ajax__tab_inner

{

background-position-x:right;

background-image:url(Images/TabRight.jpg);

background-repeat:no-repeat;

}

.ajax_tab_top.ajax__tab_tab

{

color:#21334b;

height:18px;

background-image:url(Images/TabBG.jpg);

background-repeat:repeat-x;

padding-top:1px;

padding-left:5px;

padding-right:5px;

text-align:center;

}

.ajax_tab_top.ajax__tab_hover.ajax__tab_outer

{

background-position-x:left;

background-image:url(Images/TabLeft.jpg);

background-repeat:no-repeat;

}

.ajax_tab_top.ajax__tab_hover.ajax__tab_inner

{

background-position-x:right;

background-image:url(Images/TabRight.jpg);

background-repeat:no-repeat;

}

.ajax_tab_top.ajax__tab_hover.ajax__tab_tab

{

color:orange;

height:18px;

background-image:url(Images/TabBG.jpg);

background-repeat:repeat-x;

padding-top:1px;

padding-left:5px;

padding-right:5px;

text-align:center;

}

.ajax_tab_top.ajax__tab_active.ajax__tab_outer

{

background-position-x:left;

background-image:url(Images/TabSelectedL.jpg);

background-repeat:no-repeat;

}

.ajax_tab_top.ajax__tab_active.ajax__tab_inner

{

background-position-x:right;

background-image:url(Images/TabSelectedR.jpg);

background-repeat:no-repeat;

}

.ajax_tab_top.ajax__tab_active.ajax__tab_tab

{

color:#ffffff;

height:18px;

background-image:url(Images/TabSelectedBG.jpg);

background-repeat:repeat-x;

padding-top:1px;

padding-left:5px;

padding-right:5px;

text-align:center;

}

.ajax_tab_top.ajax__tab_body

{

width:1000px;

height:27px;

background-image:url(Images/MenuBarBG.jpg);

background-repeat:repeat-x;

}

I stumbled upon the fix for this shortly after I submitted the post. I had to increase the margin-left property of the _tab_tab styles to match the width of the image to be shown on the left side of the tab.

Isn't it funny how the fixes for these things seem so obvious in retrospect?