Click here to Skip to main content
15,742,655 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
There is some picture on a Gridview in a website and i am scrolling those picture vertically using this following code:
XML
<marquee direction="up" SCROLLDELAY="15" scrollamount="2" onmouseover=this.stop()
            onmouseout=this.start() style="height: 239px">

                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>

                        <asp:GridView ID="grdad" runat="server" AutoGenerateColumns="False"
                                DataSourceID="AdDataSource" DataKeyNames="AdID" PageSize="1"
                                Height="240px" Width="181px" ShowHeader="false">
                        <Columns>
<asp:BoundField DataField="ProgrammeID" HeaderText="" Visible="false" ReadOnly="true" SortExpression="ProgrammeID" />
<asp:TemplateField ShowHeader="false">
<ItemTemplate>
<a href="<%# DataBinder.Eval(Container, "DataItem.AdLink") %>" target="_blank"><img id="imgSmall" src='Admin/Ad_Picture/<%# DataBinder.Eval(Container, "DataItem.AdImagePath") %>' alt="Gallery Image" width="181" height="205" /></a>
</ItemTemplate>
</asp:TemplateField>
</Columns>
                        </asp:GridView></marquee>
                        </ContentTemplate>
                        <Triggers>
<asp:AsyncPostBackTrigger ControlID = "grdad" />
</Triggers>
</asp:UpdatePanel></marquee>

XML
<img id="imgSmall" src='Admin/Ad_Picture/<%# DataBinder.Eval(Container, "DataItem.AdImagePath") %>' alt="Gallery Image" width="181" height="205" /></a>
</ItemTemplate>
</asp:TemplateField>
</Columns>
                        </asp:GridView>
                        </ContentTemplate>
                        <Triggers>
<asp:AsyncPostBackTrigger ControlID = "grdad" />
</Triggers>
</asp:UpdatePanel></marquee>




Is that possible to scroll those picture Horizontally?
Posted
Updated 14-Nov-11 23:42pm
v3
Comments
thatraja 15-Nov-11 5:45am    
First tell us, is the marquee running or not?
sahabiswarup 15-Nov-11 5:53am    
yes..marquee running perfectly but it scroll vertically right now but i want to scroll it horizontally

May be some mistakes in your HTML source, you missed double-quotes for the js things, check it below
HTML
<marquee direction="left" scrolldelay="15" scrollamount="2" onmouseover="<b">"this.stop();" onmouseout="this.start();" style="height: 239px">test</marquee>

And general suggestion is just try the Tags with minimum properties(to ensure the running) like below
HTML
<marquee direction="left" >test</marquee>

Further reading
HTML MARQUEE[^]
 
Share this answer
 
Comments
RaviRanjanKr 15-Nov-11 8:45am    
My 5+
did you try direction="left"?
 
Share this answer
 
Comments
sahabiswarup 15-Nov-11 4:43am    
yes i have tried..that doesn't work
By looking your code, isn't it strange that there is one <marquee> opening tag but two of closing.May be they don't match?
 
Share this answer
 
Comments
sahabiswarup 15-Nov-11 5:42am    
that just a misprint.
put your image in panal then you can scroll ur image
 
Share this answer
 
Comments
sahabiswarup 15-Nov-11 6:04am    
i have already taken the pictures in an ItemTemplate under gridview.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900