Showing posts with label downloaded. Show all posts
Showing posts with label downloaded. Show all posts

Monday, March 26, 2012

Conflict of TextboxWatermarkExtender and validators

I downloaded the latest version of Atlas and built a test page to see if TexboxWatermarkExtender would work with a validator. The code is below. When I click on the submit button for the first time (with no data in the textbox), I see correct behavior: validation fails, I see the error message, and the page is not posted back. If I make no changes and click on the submit button again, for a split-second I see a javascript error in the IE ("Sys.Application.findObject(...) is null or not an object"), and then the page is posted back. Needless to say, no validation occurs.

I am new to Atlas, so forgive me if I am making a rookie mistake somewhere:

<%@dotnet.itags.org. Page Language="C#" AutoEventWireup="true" CodeFile="TestPage.aspx.cs" Inherits="TestPage" %><%@dotnet.itags.org. Register assembly="AtlasControlToolkit" namespace="AtlasControlToolkit" tagprefix="cc1" %><!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></head><body> <form id="form1" runat="server"> <div> <atlas:ScriptManager runat="server" EnablePartialRendering="true" ID="scriptManager" /> <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" EnableViewState="true"> <cc1:TextBoxWatermarkProperties WatermarkText="mm/dd/yyyy" TargetControlID="txtDate" /> </cc1:TextBoxWatermarkExtender> <asp:TextBox ID="txtDate" runat="server" ToolTip="mm/dd/yyyy"></asp:TextBox> <asp:RegularExpressionValidator ID="regexDate" runat="server" ControlToValidate="txtDate" CssClass="evError" ErrorMessage="Enter the date in format MM/DD/YYYY" Display="Dynamic" ValidationExpression="(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d" /> <asp:Button ID="Button1" runat="server" Text="Button" /></div> </form></body></html>

Check out this thread for more info about TBW+validators:http://forums.asp.net/thread/1273626.aspx

We'll be adding this to the FAQ, too. Thanks!


Thanks a lot, will do. I missed your reply until now, sorry.
In case anyone is curious, this code only started working when I added an UpdatePanel

Saturday, March 24, 2012

Configuring VS2005 to use the AJAX Control Toolkit

Hi,

I have installed the lasted version of the ASP.Net AJAX and then downloaded the ASP.Net AJAX Control Toolkit. When trying to add the items to the Toolbox of a new ASP.NET AJAX Web Site raises the following error:

There was an error loading types from assenbly AjaxControlToolkit.dll "Could not load file or assembly System.Web.Extensions, Version:1.0.61025.0", the system couldn't find the specified file.

The file instaled in my system is: ..\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\Microsoft.Web.Extensions.dll

How can I fix this problem?.

Thanks

Marco

Matellor:

Hi,

I have installed the lasted version of the ASP.Net AJAX and then downloaded the ASP.Net AJAX Control Toolkit. ... ..\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025\Microsoft.Web.Extensions.dll

It's sounds like you did not install the latest version. Microsoft.Web.Extensions is from the beta, RC1 has System.Web.Extensions. Make sure you installed RC1 if you're using the latest toolkit.

Configure a ATLAS website in IIS

I downloaded the ATLAS msi, installed it, and I could create a ATLAS enabled ASP.Net web project. It works fine from VS.Net 2005, but when I copy the project to ISS it doesn't work. I copied the entire solution to C:\Inetpub\wwwroot\ATLASWebDemo, and created a web application called "ATLASWebDemo", but as soon as I execute the page I get "Object reference not set to an instance of an object" Messagebox.

How do I configure IIS to deply this solution to our IIS server (Windows Server 2003)?

Regards

Arno

hello.

have you checked if iis is configured to use asp.net 2.0?


Have got any new ideeas, because I am in the same situation...

Johan

www.helheten.net


Yes, the ASP.Net 2.0 application works 100%, but as soon as I invoke the timer <atlas:TimerControl> I get "Object reference not set to an instance of an object". It works fine when I run it from the VS.Net 2005 IDE, but as soon as I copy the solution to my InetPub folder it doesn't work.

How would you publish a solution that is using ATLAS? I am sure I am missing a setting in IIS or something.

Thank for the speedy reply.


Hi there, no ideas yet, I'll be trying again today, will keep you up to date.

I'm also have the same problem, but also in Cassini.

Here is the server respone for TimerControl request:

<delta><pageError message="Object reference not set to an instance of an object." /></delta></delta>


hello.

well, this means that you're getting an exception on the server side...it's not a configuration problem though.


Here are some suggestions (yes, some are obvious, but you never know):

1) Check to make sure Microsoft.Web.Atlas.DLL is indeed copied over and resides in the bin directory.

2) Check web.config to confirm it has the correct references to Atlas.

3) Look in EventViewer and see if there are any helpful logs coming from the app.

4) Use tools such as FileMon (fromwww.sysinternals.com) to check if there are any permissioning issues that could prevent objects from getting created.

-Jeff