Tja, da sieht man mal wieder, wohin die Verbindung aus JavaScript
und Servercode f�hren kann ;-)
> Wenn ich aber ein HTML-Steuerelement nehme in der Form:
> <Input type="text" runat="server" ID="txtInput2" Width="50"
> Onchange='txtInput1_Changed()/"'>
> Dann kommt beim Start der Seite: The base class includes the
> field 'txtInput2', but its type
> (System.Web.UI.WebControls.TextBox) is not compatible with
> the type of control (System.Web.UI.HtmlControls.HtmlInputText).
Dann musst du im CodeBehind txtInput2 auch als HtmlInput deklarieren
und nicht als TextBox.
Ich w�rde aber bei der ASP-Textbox bleiben. Im CodeBehind f�gst du
dann einfach das Client-Event hinzu:
protected TextBox bla;
...
bla.Attributes.Add("onChange", "checkLength(this.id);");
...
JavaScript Pseudocode:
function checkLength(id) {
if(document.getElementById(id).value.length == 2) {
... mach was
}
}
Gru�, Thomas
http://blogs.dotnetgerman.com/thomas/
_______________________________________________
Asp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net