This project is read-only.

Validators do not stop postback when using GoogleMap

Jul 28, 2008 at 2:05 PM
Hello,

When I'm using your GoogleMap control, clicking on submit button always cause postback even when validators should stop it.

Here is a sample that demonstrate the issue :
<%@ Page Language="C#" %>

<%@ Register Assembly="Artem.GoogleMap" Namespace="Artem.Web.UI.Controls" 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>
            <cc1:GoogleMap ID="GoogleMap1" runat="server" Latitude="48.85" Longitude="2.35"/>
            <br />
            <asp:TextBox ID="TextBox1" runat="server" />
            <asp:RequiredFieldValidator runat="server" ControlToValidate="TextBox1" ErrorMessage="*" />
            <br />
            <asp:Button ID="Button1" runat="server" Text="Button" />
            <br />
            Last PostBack time : <%=DateTime.Now.ToString() %>
        </div>
    </form>
</body>
</html>

Try this page with and without the GoogleMap control to see the difference...

Thanks

Sep 10, 2009 at 9:23 AM

Anyone solve it? I have this problem too.