LightBox cannot work

2 posts, 0 answers
  1. 宝 avatar
    1 posts
    Member since:
    Mar 2015

    Posted 02 Mar 2015 Link to this post

    I follow the help article to learn lightbox,but the picture does not show after running

    1、Create a new webpage in Visual Studio.
    2、Add a RadLightBox from the Telerik UI toolbar.
    3、Add an Image control(named Image1) to the web page.
    4、Into the item collection of the RadLightBox add a new item(item 0) and set the TargetControlID(Image1) to the Image ID.
    5、Set ImageURL(~/img/1.jpg) to point to the image, which will be displayed into the window.
    6、Add a title and description of the item that will provide descriptive information about the image.
    7、Press F5 to compile and run the application.

    the aspx file
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TelerikWebApp1.WebForm1" %>

    <!DOCTYPE html>

    <html xmlns="">
    <head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            <telerik:RadLightBox ID="RadLightBox1" runat="server" PreserveCurrentItemTemplates="False">
                    <telerik:RadLightBoxItem ImageUrl="~/img/1.jpg" TargetControlID="Image1">
            <asp:Image ID="Image1" runat="server" Height="49px" Width="107px" />

  2. Daniel
    Daniel avatar
    4949 posts

    Posted 05 Mar 2015 Link to this post

    Hello ,

    I tested your code on my end but it is working as expected. Please download the attached example and let me know if it is ok at your side. You only need to add the BIN folder with the assemblies and  then open the folder as a website in Visual Studio.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top