1
Answer

how to get marque text ID from database

Imran Pervez

Imran Pervez

14y
2.7k
1
Dear all
I use a custom control for display news on my web application with marquee option
marquee data is show from database.

my issue is that......when click on marquee item how i get clicked item ID from database for transferring acording to clicked news page

data tabel=menuset
data field is= ID ,item,url

 my code is

 dbClasses.clsSqlConnection objclsSqlConnection = new MPOWER.dbClasses.clsSqlConnection();
        DataSet menuset = new DataSet();
        protected void Page_Load(object sender, EventArgs e)
        {
            menuset = objclsSqlConnection.GetDataSet((string)ConfigurationSettings.AppSettings["sConnectionString1"], "Select * from MainMenu");
            if (menuset.Tables.Count > 0)
            {
                Datalist2.DataSource = menuset;
                Datalist2.DataBind();
            }
        
        }

--------------------------
<tr>
        <td class="style42" style="font-size: small; font-style: normal;">
             <marquee  onmouseover="this.stop();" behavior="Scroll" direction="up" 
                 scrolldelay="250" onmouseout="this.start();" style="height: 101px">
            <asp:DataList ID="Datalist2" runat="server" cellspacing="0" ForeColor="White"
                 >
           
                      
                <ItemTemplate>
              
                    <asp:HyperLink ID="Hyperlink1" runat="server"
                   
                        />
                    &nbsp; <a href='<%# DataBinder.Eval(Container.DataItem,"Url") %>'>
                        <%# DataBinder.Eval(Container.DataItem,"Title") %>
                    </a>
                   
                </ItemTemplate>
             
            </asp:DataList></marquee>
        </td>
    </tr>



----------------

i am waiting for solution
thanks in advance
Answers (1)