Click to See Complete Forum and Search --> : ASP.Net with Netscape
s_bist
June 3rd, 2002, 01:24 AM
ASP.Net does not work with Netscape it seems.
I made a form with a validation control. The validation control does not do the validation client side..after submitting, the form gets submitted and then i get the message..
It works fine with IE.
Any answer?
Thnx
bolti
June 4th, 2002, 08:45 AM
It should not be any kind of problem since the server only should send forward the <html> code but maybe he doesnt suport the controll
:confused:
semaphore
June 16th, 2002, 09:26 PM
ASP.Net Validation controls don't do client side
validation for Netscape because DOM model differ.
So for IE validation is done on the client side and the server and for Netscape it is done on the server side.
rick_dangerous
June 21st, 2002, 01:23 AM
AFAIK all controls delivered by Microsoft within the .Net framework SDK are compatible with Netscape 2.xx+ and IE 3.xx+
JimH
June 24th, 2002, 01:19 PM
I have been having similar problems to the ones cited by s_bist.
In a very simple case, both IE and NS 6 were OK, but NS4 failed.
In a more complex case (code given below) IE 6.2 is OK, but both versions of Netscape fail in an identical fashion -- one which suggests to me that there is some kind of state-preservation problem.
Sorry the code is lengthy, but this is the simplest version I can demonstrate.
There is a form containing two panels, each with a textbox and submit button.
The panels are toggled (made visible/invisible) by the submit button, which also initiates validation on the current textbox.
If the textbox contains input the alternate sub-form is exposed; if not the user is asked to type something.
NS 4.79 and NS 6.2.3 toggle panels irrespective of textbox input; on the second and subsequent exposures of Panel1 (but not Panel2) the error message is displayed when the new page is loaded and before user interaction takes place.
Code follows ... Note: in order to display lines of code, leading "<" characters had to be replaced with "[" -- using '' did not help.
TIA
JimH
[code=.aspx]
[body>
Testing Validation
[form id="TestForm" action="WebForm1.aspx" method="post" runat="server"]
[asp:Panel ID="Panel1" Runat="server">
[asp:Table id="Table1" Runat="server">
[asp:TableRow>
[asp:TableCell Font-Name="Arial">
[asp:TextBox ID="TestBox1" Columns="10" Runat="server"></asp:TextBox>
[asp:RequiredFieldValidator ID="reqTest1" Runat="server" ControlToValidate="TestBox1" ErrorMessage="Type something - 1" Display="Dynamic"></asp:RequiredFieldValidator>
[/asp:TableCell>
[/asp:TableRow>
[asp:TableRow>
[asp:TableCell>
[asp:Button CausesValidation="True" ID="btnSubmit1" OnClick="btn_Test1" Text="Validate 1!" Runat="server"></asp:Button>
[/asp:TableCell>
[/asp:TableRow>
[/asp:Table>
[/asp:Panel>
[asp:Panel ID="Panel2" Runat="server">
[asp:Table id="Table2" Runat="server">
[asp:TableRow>
[asp:TableCell Font-Name="Arial">
[asp:TextBox ID="TestBox2" Columns="10" Runat="server"></asp:TextBox>
[asp:RequiredFieldValidator ID="reqTest2" Runat="server" ControlToValidate="TestBox2" ErrorMessage="Type something - 2" Display="Dynamic"></asp:RequiredFieldValidator>
[/asp:TableCell>
[/asp:TableRow>
[asp:TableRow>
[asp:TableCell>
[asp:Button CausesValidation="True" ID="btnSubmit2" OnClick="btn_Test2" Text="Validate 2!" Runat="server"></asp:Button>
[/asp:TableCell>
[/asp:TableRow>
[/asp:Table>
[/asp:Panel>
[/form>
[/body>
[/HTML>
[code=.aspx.cs]
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace WebApplication3
{
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TestBox1;
protected System.Web.UI.WebControls.Table Table1;
protected System.Web.UI.WebControls.Panel Panel1;
protected System.Web.UI.WebControls.Button btnSubmit1;
protected System.Web.UI.WebControls.TextBox TestBox2;
protected System.Web.UI.WebControls.Table Table2;
protected System.Web.UI.WebControls.Panel Panel2;
protected System.Web.UI.WebControls.Button btnSubmit2;
//
public void Page_Load(object sender, System.EventArgs e)
{
// User code to initialize the page
Panel1.Visible = true;
Panel2.Visible = false;
}
public void btn_Test1(object sender, System.EventArgs e)
{
Panel1.Visible = false;
Panel2.Visible = true;
}
public void btn_Test2(object sender, System.EventArgs e)
{
Panel1.Visible = true;
Panel2.Visible = false;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
JimH
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.