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. Providing link to the images that are shown in Slideshowextender control

Providing link to the images that are shown in Slideshowextender control

Scheduled Pinned Locked Moved ASP.NET
csharphtmlasp-netdatabasevisual-studio
6 Posts 3 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.
  • J Offline
    J Offline
    jknascrimz
    wrote on last edited by
    #1

    Hi, I am working with VS.Net 2008 application & am in need to provide some link (for ex: http:www.google.com)to the Images that are shown in the slideshowextender ajax control in asp.net with c#. On the click of the every single image a new window with the corresponding URL(retrieved from the DB) should get open. Kindly help me in getting through this. Waiting for your response. Thank You. I have pasted the html source code & code behind use , Pls help me... Design page This Design page is an user control & iam accessing the GetImage Method from its Parent page, in which i wrote the Code (pasted below) <asp:Image ID="image1" runat="server" Height="150px" Width="230px" /> <br /> <cc1:SlideShowExtender ID="SlideShowExtender1" runat="server" AutoPlay="true" Loop="true" SlideShowServiceMethod="GetImage" TargetControlID="image1"> </cc1:SlideShowExtender> Code behind page [System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod] public static AjaxControlToolkit.Slide[] GetImage() { string promophotos, promoimages; SqlDataSource ds = new SqlDataSource(); ds.ConnectionString = ConnectionString.Str_SqlCon_CmInfoline.ToString(); string mySelect; int count = 0; mySelect = "select Tooltip,BschoolName,Imageurl,UrlPath from Tbl_InfolinePromoPhotos"; ds.SelectCommand = mySelect; System.Data.DataView dv = (System.Data.DataView)ds.Select(new DataSourceSelectArguments()); count = dv.Table.Rows.Count; AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[count]; try { for (int i = 0; i < count; i++) { promophotos = dv.Table.Rows[i]["Imageurl"].ToString(); string[] photopath = promophotos.Split(','); promoimages = photopath[1]; slides[i] = new AjaxControlToolkit.Slide(Global.contentUrl + "/Admin/Bschool/PromoPhotos/" + promoimages.TrimStart('.'), dv.Table.Rows[i]["Tooltip"].ToString(), dv.Table.Rows[i]["UrlPath"].ToString()); } } catch { } return (slides); }

    C 1 Reply Last reply
    0
    • J jknascrimz

      Hi, I am working with VS.Net 2008 application & am in need to provide some link (for ex: http:www.google.com)to the Images that are shown in the slideshowextender ajax control in asp.net with c#. On the click of the every single image a new window with the corresponding URL(retrieved from the DB) should get open. Kindly help me in getting through this. Waiting for your response. Thank You. I have pasted the html source code & code behind use , Pls help me... Design page This Design page is an user control & iam accessing the GetImage Method from its Parent page, in which i wrote the Code (pasted below) <asp:Image ID="image1" runat="server" Height="150px" Width="230px" /> <br /> <cc1:SlideShowExtender ID="SlideShowExtender1" runat="server" AutoPlay="true" Loop="true" SlideShowServiceMethod="GetImage" TargetControlID="image1"> </cc1:SlideShowExtender> Code behind page [System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod] public static AjaxControlToolkit.Slide[] GetImage() { string promophotos, promoimages; SqlDataSource ds = new SqlDataSource(); ds.ConnectionString = ConnectionString.Str_SqlCon_CmInfoline.ToString(); string mySelect; int count = 0; mySelect = "select Tooltip,BschoolName,Imageurl,UrlPath from Tbl_InfolinePromoPhotos"; ds.SelectCommand = mySelect; System.Data.DataView dv = (System.Data.DataView)ds.Select(new DataSourceSelectArguments()); count = dv.Table.Rows.Count; AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[count]; try { for (int i = 0; i < count; i++) { promophotos = dv.Table.Rows[i]["Imageurl"].ToString(); string[] photopath = promophotos.Split(','); promoimages = photopath[1]; slides[i] = new AjaxControlToolkit.Slide(Global.contentUrl + "/Admin/Bschool/PromoPhotos/" + promoimages.TrimStart('.'), dv.Table.Rows[i]["Tooltip"].ToString(), dv.Table.Rows[i]["UrlPath"].ToString()); } } catch { } return (slides); }

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Why ask this twice ? What you need to do is put an index on the URL and start the slideshow from that index if it's browsed to that way.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      A J 2 Replies Last reply
      0
      • C Christian Graus

        Why ask this twice ? What you need to do is put an index on the URL and start the slideshow from that index if it's browsed to that way.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        J Offline
        J Offline
        jknascrimz
        wrote on last edited by
        #3

        [Message Deleted]

        A 1 Reply Last reply
        0
        • C Christian Graus

          Why ask this twice ? What you need to do is put an index on the URL and start the slideshow from that index if it's browsed to that way.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          Christian Graus wrote:

          Why ask this twice ?

          May be he expecting two different approaches. :laugh: Cross Post, Message Delete is now very much common with this ASP.NET Forum. :(

          Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

          1 Reply Last reply
          0
          • J jknascrimz

            [Message Deleted]

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            jknascrimz wrote:

            Sorry for repeating this Question bcoz i didn't get any correct solution till now thats y i made it again.

            You should wait. Please read forum guideline. Here every body want to helps you. If some one knows the answer they will definitely reply you ! :thumbsup:

            Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

            J 1 Reply Last reply
            0
            • A Abhijit Jana

              jknascrimz wrote:

              Sorry for repeating this Question bcoz i didn't get any correct solution till now thats y i made it again.

              You should wait. Please read forum guideline. Here every body want to helps you. If some one knows the answer they will definitely reply you ! :thumbsup:

              Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

              J Offline
              J Offline
              jknascrimz
              wrote on last edited by
              #6

              Sorry for my disturbance I will not repeat this mistake... & thanks for ur co-operation...

              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