Help in ASP.NET 1.1 custom controls
-
i wanna add a custom control to a webform in ASP.NET 1.1, and i've two problems: (Hint: the custom control has some javascript code that i wrote in the same file *.ascx with the controls in this custom control) 1- when i add my custom control more than once in the webform, the javascript don't work att all,..(it's a rollover behavior) 2-i need to put a hidden field in this custom control that have a value which is ,set by the javascript code, AND accessed by the webform that have this custom control on it.... i know this sounds complicated, but i've no other choise (hint: does anyone know any other way(s) to build the rating control (the filled stars) just like the one in yahoo video, to make a survey form, and with no postbacks) thnx for ur help Kariem
-
i wanna add a custom control to a webform in ASP.NET 1.1, and i've two problems: (Hint: the custom control has some javascript code that i wrote in the same file *.ascx with the controls in this custom control) 1- when i add my custom control more than once in the webform, the javascript don't work att all,..(it's a rollover behavior) 2-i need to put a hidden field in this custom control that have a value which is ,set by the javascript code, AND accessed by the webform that have this custom control on it.... i know this sounds complicated, but i've no other choise (hint: does anyone know any other way(s) to build the rating control (the filled stars) just like the one in yahoo video, to make a survey form, and with no postbacks) thnx for ur help Kariem
Create a composite control , in that use javascript something like this if (MaxLength > 0 && TextMode == TextBoxMode.MultiLine) { // Add javascript handlers for paste and keypress Attributes.Add("onkeypress", "doKeypress(this);"); Attributes.Add("onbeforepaste", "doBeforePaste(this);"); Attributes.Add("onpaste", "doPaste(this);"); // Add attribute for access of maxlength property on client-side Attributes.Add("maxLength", this.MaxLength.ToString()); // Register client side include - only once per page if (!Page.ClientScript.IsClientScriptIncludeRegistered("TextArea")) { Page.ClientScript.RegisterClientScriptInclude("TextArea", ResolveClientUrl("~/FSjavaScript/textArea.js")); } } then u can use the control as many times u feel like , the scripts will not roll up