Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Help in ASP.NET 1.1 custom controls

Help in ASP.NET 1.1 custom controls

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-nethelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kariem Soudy
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • K Kariem Soudy

      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

      D Offline
      D Offline
      deepaks3
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups