Providing link to the images that are shown in Slideshowextender control
-
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); }
-
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); }
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.
-
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.
[Message Deleted]
-
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.
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.
-
[Message Deleted]
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.
-
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.
Sorry for my disturbance I will not repeat this mistake... & thanks for ur co-operation...