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. javascript with usercontrol

javascript with usercontrol

Scheduled Pinned Locked Moved ASP.NET
javascriptcsharpcomdata-structurestools
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.
  • M Offline
    M Offline
    Mohammed Elkholy
    wrote on last edited by
    #1

    hi all i try to make slid show and i use it in a usercontrol it works well but i want to get the image array from cs file here is the code <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="JavaHomePhotoAlbum.ascx.cs" Inherits="taboukproject.UserControls.JavaHomePhotoAlbum" %> <script type="text/javascript" src="../Scripts/dropinslideshow2.js"> </script> <div style="width: 205px; height: 180px;" align="right"> <script type="text/javascript"> //Define Image Array. Syntax: ["image_path", "url_destination", "url_target"] var myimages=new Array(); myimages[0]=["../Images/TabukImages/castle1.jpg", "", ""] myimages[1]=["../Images/TabukImages/castle2.jpg", "http://www.dynamicdrive.com", ""] myimages[2]=["../Images/TabukImages/castle4.jpg", "http://www.javascriptkit.com", "_new"] //Create new drop-in slideshow //Syntax: new dropinslideshow(image_array, slideshow_width, slideshow_height, delay_before_rotation) new dropinslideshow(myimages, 200, 160, 3000) </script> </div> please i want to know how can i atchive it i try this code but not working var myimages=new Array(<%ImagesArray(); %>); the method ImageArray returns arraylist but i can't see it inside the script even i set the method to public

    MD_NADA

    N 1 Reply Last reply
    0
    • M Mohammed Elkholy

      hi all i try to make slid show and i use it in a usercontrol it works well but i want to get the image array from cs file here is the code <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="JavaHomePhotoAlbum.ascx.cs" Inherits="taboukproject.UserControls.JavaHomePhotoAlbum" %> <script type="text/javascript" src="../Scripts/dropinslideshow2.js"> </script> <div style="width: 205px; height: 180px;" align="right"> <script type="text/javascript"> //Define Image Array. Syntax: ["image_path", "url_destination", "url_target"] var myimages=new Array(); myimages[0]=["../Images/TabukImages/castle1.jpg", "", ""] myimages[1]=["../Images/TabukImages/castle2.jpg", "http://www.dynamicdrive.com", ""] myimages[2]=["../Images/TabukImages/castle4.jpg", "http://www.javascriptkit.com", "_new"] //Create new drop-in slideshow //Syntax: new dropinslideshow(image_array, slideshow_width, slideshow_height, delay_before_rotation) new dropinslideshow(myimages, 200, 160, 3000) </script> </div> please i want to know how can i atchive it i try this code but not working var myimages=new Array(<%ImagesArray(); %>); the method ImageArray returns arraylist but i can't see it inside the script even i set the method to public

      MD_NADA

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      You need to user ScriptManager.RegisterArrayDeclaration Have a look here[^]


      only two letters away from being an asset

      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